CodeFirstWebFramework 1.3.160
See the version list below for details.
dotnet add package CodeFirstWebFramework --version 1.3.160
NuGet\Install-Package CodeFirstWebFramework -Version 1.3.160
<PackageReference Include="CodeFirstWebFramework" Version="1.3.160" />
paket add CodeFirstWebFramework --version 1.3.160
#r "nuget: CodeFirstWebFramework, 1.3.160"
// Install CodeFirstWebFramework as a Cake Addin #addin nuget:?package=CodeFirstWebFramework&version=1.3.160 // Install CodeFirstWebFramework as a Cake Tool #tool nuget:?package=CodeFirstWebFramework&version=1.3.160
CodeFirstWebFramework Web App development tool
Now available as a NuGet package, downloadable directly from Visual Studio.
This DLL enables you to build a highly functional C# web app with minimal coding. Your Main method has only to call
Config.Load(args);
new WebServer().Start();
This will load (or create) the config file, analyse the code for classes which should be persisted to the database, ensure the database schema is up to date with the code, and start listening for web requests on the default port (8080).
The database is a local SQLite database by default, but can be set (in the config file) to any accessable MySql or Sql Server database. The default port and a number of other settings can also be overridden in the config file.
The web server will serve any html or other files placed in a subfolder with the same name as the main namespace of your project.
However, this is only the beginning. Instead of serving html files, the server can construct the html by merging Mustache .tmpl files with the default.tmpl file. This allows you to make the default.tmpl file a standard look and feel for the whole website, with individual page data being inserted in it as appropriate.
Even more useful, selected pages can be created or altered using C# code - each C# class which is a subclass of AppModule acts as a virtual directory, and each public method in that class acts as a virtual file in that directory. So, for example, a web request for /home/listing.html will create an object of the AppModule subclass Home, and call the Listing method. This method could retrieve a list of records from the database, and the home/listing.tmpl file could display them as a searchable table.
Because the templates are Mustache, you can insert information from variables in the C# program directly into the output html, including processing lists and arrays.
There is an extensive library of javascript (in default.js
) which works with the C# code to provide support for forms, data tables, array list/edit forms and header-detail forms, along with callbacks to the C# code using ajax and json.
There is built-in support for backing up and restoring the database (to json format).
There is built in (but extensible) optional support for creating users with logins and passwords, and giving each user a permission level for the whole system, or even individual modules or methods.
There is also built-in support for GitHub style Markdown (like this file), both in general use, and for writing context-sensitive help with a table of contents.
The DLL can actually run multiple web servers on the same port (distinguished by the server part of the url), or different ports, each of which can use the same or different C# code (distinguished by C# Namespaces) and use different databases. You can also customise the look and feel of each server, as the template code looks for templates in a folder named for the server, then a folder named for the app namespace, then in the CodeFirstWebFramework folder.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- Markdig (>= 0.38.0)
- Microsoft.AspNetCore.Cryptography.KeyDerivation (>= 8.0.10)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- MimeMapping (>= 3.0.1)
- mustache-sharp (>= 1.0.0)
- MySql.Data (>= 9.1.0)
- MySqlConnector (>= 2.3.7)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.8.6)
- System.Data.SQLite.Core (>= 1.0.119)
- System.Text.Encoding.CodePages (>= 8.0.0)
-
.NETStandard 2.0
- Markdig (>= 0.38.0)
- Microsoft.AspNetCore.Cryptography.KeyDerivation (>= 8.0.10)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- MimeMapping (>= 3.0.1)
- mustache-sharp (>= 1.0.0)
- MySql.Data (>= 9.1.0)
- MySqlConnector (>= 2.3.7)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.8.6)
- System.Data.SQLite.Core (>= 1.0.119)
- System.Text.Encoding.CodePages (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.3.161 | 89 | 11/18/2024 |
1.3.160 | 83 | 11/5/2024 |
1.3.159 | 87 | 10/31/2024 |
1.3.158 | 76 | 10/31/2024 |
1.3.157 | 92 | 10/24/2024 |
1.3.156 | 80 | 10/24/2024 |
1.3.155 | 82 | 10/22/2024 |
1.3.154 | 78 | 10/22/2024 |
1.3.150 | 147 | 10/18/2024 |
1.3.147 | 100 | 10/10/2024 |
1.3.145 | 94 | 10/2/2024 |
1.3.144 | 86 | 10/2/2024 |
1.3.143 | 114 | 9/19/2024 |
1.3.142 | 142 | 9/5/2024 |
1.3.140 | 101 | 9/4/2024 |
1.3.139 | 243 | 7/18/2024 |
1.3.138 | 106 | 7/18/2024 |
1.3.137 | 100 | 7/15/2024 |
1.3.136 | 83 | 7/4/2024 |
1.3.135 | 114 | 5/30/2024 |
1.3.132 | 161 | 3/21/2024 |
1.3.130 | 145 | 2/20/2024 |
1.3.129 | 239 | 12/8/2023 |
1.3.128 | 132 | 12/7/2023 |
1.3.123 | 142 | 12/6/2023 |
1.3.121 | 270 | 9/20/2023 |
1.3.119 | 157 | 9/6/2023 |
1.3.111 | 227 | 8/3/2023 |
1.3.109 | 180 | 7/20/2023 |
1.3.107 | 187 | 7/18/2023 |
1.3.106 | 182 | 7/18/2023 |
1.3.105 | 244 | 6/27/2023 |
1.3.103 | 202 | 6/15/2023 |
1.3.102 | 198 | 6/13/2023 |
1.3.101 | 190 | 6/1/2023 |
1.3.98 | 243 | 4/27/2023 |
1.3.97 | 353 | 3/22/2023 |
1.3.96 | 309 | 3/16/2023 |
1.3.95 | 389 | 1/10/2023 |
1.3.94 | 382 | 1/5/2023 |
1.3.93 | 381 | 1/4/2023 |
1.3.89 | 428 | 11/17/2022 |
1.3.85 | 408 | 11/15/2022 |
1.3.84 | 414 | 11/12/2022 |
1.3.83 | 392 | 11/10/2022 |
1.3.82 | 408 | 11/3/2022 |
1.3.81 | 507 | 10/14/2022 |
1.3.80 | 464 | 8/23/2022 |
1.3.79 | 485 | 8/4/2022 |
1.3.78 | 519 | 7/20/2022 |
1.3.77 | 546 | 6/9/2022 |
1.3.76 | 516 | 6/8/2022 |
1.3.73 | 588 | 5/4/2022 |
1.3.72 | 513 | 4/27/2022 |
1.3.71 | 518 | 4/27/2022 |
1.3.70 | 529 | 4/7/2022 |
1.3.69 | 507 | 3/31/2022 |
1.3.68 | 555 | 3/29/2022 |
1.3.67 | 541 | 3/25/2022 |
1.3.66 | 512 | 3/23/2022 |
1.3.65 | 497 | 3/15/2022 |
1.3.61 | 532 | 3/11/2022 |
1.3.59 | 479 | 12/9/2021 |
1.3.57 | 450 | 9/28/2021 |
1.3.55 | 446 | 9/19/2021 |
1.3.54 | 536 | 7/12/2021 |
1.3.53 | 450 | 6/21/2021 |
1.3.52 | 428 | 6/21/2021 |
1.3.51 | 456 | 6/18/2021 |
1.3.50 | 450 | 5/11/2021 |
1.3.49 | 486 | 3/17/2021 |
1.3.48 | 491 | 3/8/2021 |
1.3.47 | 500 | 3/5/2021 |
1.3.46 | 553 | 3/5/2021 |
1.3.44 | 611 | 2/15/2021 |
1.3.42 | 588 | 2/15/2021 |
1.3.41 | 570 | 2/5/2021 |
1.3.37 | 774 | 11/27/2020 |
1.3.36 | 688 | 11/25/2020 |
1.3.35 | 660 | 11/22/2020 |
1.3.34 | 654 | 11/20/2020 |
1.3.33 | 710 | 11/18/2020 |
1.3.31 | 710 | 11/6/2020 |
1.3.30 | 737 | 10/30/2020 |
1.3.27 | 697 | 10/16/2020 |
1.3.26 | 759 | 10/16/2020 |
1.3.25 | 753 | 10/14/2020 |
1.3.24 | 712 | 9/21/2020 |
1.3.23 | 738 | 9/14/2020 |
1.3.22 | 691 | 9/14/2020 |
1.3.21 | 783 | 7/17/2020 |
1.3.19 | 696 | 7/17/2020 |
1.3.18 | 729 | 7/16/2020 |
1.3.17 | 721 | 7/6/2020 |
1.3.16 | 801 | 6/27/2020 |
1.3.11 | 752 | 6/17/2020 |
1.3.10 | 728 | 6/11/2020 |
1.3.9 | 819 | 5/22/2020 |
1.3.8 | 731 | 5/21/2020 |
1.3.4 | 705 | 5/15/2020 |
1.3.2 | 731 | 5/14/2020 |
1.2.29 | 856 | 3/21/2020 |
1.2.28 | 832 | 3/20/2020 |
1.2.25 | 757 | 3/3/2020 |
1.2.24 | 811 | 2/17/2020 |
1.2.22 | 870 | 12/26/2019 |
1.2.21 | 836 | 12/3/2019 |
1.2.20 | 838 | 11/22/2019 |
1.2.18 | 812 | 11/22/2019 |
1.2.16 | 754 | 11/14/2019 |
1.2.15 | 806 | 11/14/2019 |
1.2.14 | 821 | 11/11/2019 |
1.2.13 | 802 | 11/5/2019 |
1.2.12 | 826 | 9/23/2019 |
1.2.11 | 833 | 9/19/2019 |
1.2.10 | 811 | 9/2/2019 |
1.2.9 | 908 | 8/29/2019 |
1.2.8 | 759 | 8/28/2019 |
1.2.7 | 759 | 8/26/2019 |
1.2.6 | 881 | 8/23/2019 |
1.2.5 | 837 | 8/22/2019 |
1.2.2 | 858 | 7/26/2019 |
1.2.1 | 893 | 7/16/2019 |
1.2.0 | 918 | 7/11/2019 |
1.1.7 | 1,134 | 9/10/2018 |
1.1.6 | 1,155 | 7/4/2018 |
1.1.4 | 1,304 | 3/8/2018 |
1.1.3 | 1,261 | 3/1/2018 |
1.1.0 | 1,283 | 2/8/2018 |
1.0.17 | 1,346 | 12/12/2017 |
1.0.16 | 1,251 | 11/13/2017 |
1.0.14 | 1,216 | 9/1/2017 |
1.0.13 | 1,259 | 8/22/2017 |
1.0.12 | 1,186 | 8/14/2017 |
1.0.11 | 1,186 | 8/8/2017 |
1.0.10 | 1,203 | 8/3/2017 |
1.0.8 | 1,236 | 7/31/2017 |
1.0.7 | 1,224 | 7/25/2017 |
1.0.6 | 1,183 | 7/18/2017 |
1.0.2 | 1,209 | 7/18/2017 |
1.0.1 | 1,249 | 6/22/2017 |
1.0.0 | 1,239 | 6/20/2017 |
Fix bug in multi page forms, so Back button isn;t replaced by cancel on change of page (which is now called section in the button).