https://fujiwat.github.io/bookWeb/wwwroot/
This is a sample program of F# program using F# WebSharper-SPA. Database connection needs a client Server dataexchange and it is not implemented. (Actually database is prepared and sql is not a problem. But could not find how to edit the WebSharper-web source code.)
Modern web browser. Visual Studio 2022, Windows 10 Commands as followings:
> dotnet new -i WebSharper.Templates
> dotnet tool install -g dotnet-ws
> cd c:\<parent-folder-of-the-projects>
> dotnet new websharper-spa -lang f# -n <project-name>
> cd <project-name>
> dotnet add package WebSharper.UI
> dotnet tool install -g dotnet-ws
> dotnet add package WebSharper.JQuery
> dotnet ws build ←Able to skip this line.
> dotnet run
This is a sample program and cannot register to your database. When reloading your page, registered data will be disappeared.
If you try to simulate registering books, follow the steps below.
-
Input a book data
Input the Title, Author, Published Year. Year is a mondatory field. If you not find the year, type 0
-
Then, you can see the following line.
The Orange text lineBook "new book" by "new author" is added to the top.
is a message.
Your registered book is shown on top of the list.
-
Type title or author. Currently year published is not effect to the result.
Text are case insensitive.
-
Then, search result is shown on the list bellow. Text is case insensitive. If there is no title/author which means any title/author. If both title, author is not entered then all book list are shown.
- Register books
- Book Search:
Case insensitive.
Title = no text that means any title.
Author = no text that means any author.
Both Title and Author field has no text string, then all books are listed.
Book list data is created by the following web site.
The Greatest Books of All Time: Source: https://thegreatestbooks.org/
Takahiro FUJIWARA
https://www.linkedin.com/in/fujiwat/