Please note: While EWL has been in production use for many years, this Getting Started guide is brand new. If you run into problems please let us know in our community forum and one of the developers will help you out.
Last updated for Enterprise Web Library version 83.
- Windows 11
- Visual Studio 2022 or later (recommended), or .NET 8 SDK
- SQL Server 2022 or later, MySQL 8.0 or later, or Oracle Database 12c or later (if you want a relational database)
For servers, the only requirement is Windows Server 2019 or later with IIS enabled.
-
Visit http://ewl.enterpriseweblibrary.org/create-system to download a ZIP file containing your new starter system. Extract the files into a location of your choice.
-
Open the solution file in Visual Studio. In the Package Manager Console, run
Get-Project -All | Install-Package Ewl
. -
Again in the Package Manager Console, run
Update-DependentLogic
. This will copy some web-framework files into the solution, and generate a few pieces of code in both projects. It will also apply some IIS configuration (if installed) in case you wish to use this as a local web server instead of Kestrel. -
Understand the elements of your new system:
-
The
Library
project, which contains configuration files, provider classes (which allow parts of EWL’s behavior to be customized), and aGlobalInitializer
class (which gives you a place to initialize static fields when your system starts up).Library
should also be the home of most of your "business logic" and anything else that you would reuse across multiple applications in your system. Right now your system only contains a single web app, but as it grows, you may need another web app or a different type of application, e.g. a Windows service. -
The
Website
project, which referencesLibrary
and will contain your pages and other resources.
More information on this is available from our developers; please ask for help in the forum.
-
-
Run the
Website
project. If you see a home page that reads “Welcome to the Enterprise Web Library!”, everything is working and you can begin building your system.
-
Add the
<database>
element to the three installation configuration files (i.e. theStandard.xml
files inLibrary/Configuration/Installation/Installations
) after the closing</administrators>
tag:-
For SQL Server, use
<database xsi:type="SqlServerDatabase" />
. The database name will beSystemShortNameDev
,SystemShortName
being replaced with the value from yourGeneral.xml
configuration file. Use the<database>
child element to override this naming convention. -
For MySQL, use
<database xsi:type="MySqlDatabase" />
. The schema name will besystem_short_name_dev
,system_short_name
being replaced with a lowercased, underscore-separated version of the value from yourGeneral.xml
configuration file. Use the<database>
child element to override this naming convention. -
For Oracle, use
<database xsi:type="OracleDatabase">
with the<tnsName>
,<userAndSchema>
, and<password>
child elements. Name your schema whatever you like. We have no convention. The MySQL convention may work.
-
-
In the Package Manager Console, run
Update-Data
. This will create (or re-create) the database. -
Add the
<database>
element to the development configuration file (i.e.Library/Configuration/Development.xml
) after the<webProjects>
element.
Now, when you run Update-DependentLogic
, data-access code will be generated for your database.
This section is more theoretical than practical since it’s generally not a good practice to deploy enterprise software by hand, and without a continuous integration infrastructure.
-
In the Package Manager Console, run
ExportLogic
. -
Somehow copy the exported logic and configuration to the server.
-
Create and initialize a database using the appropriate steps above. The database name should be slightly different; replace
Dev
or_dev
with the short name of your installation from the configuration file. Also, for SQL Server, grant theNETWORK SERVICE
account reader/writer access to the database. -
Set up an IIS website or virtual directory that points at the appropriate folder in the logic that you copied to the server in step 2. Run the application pool as
NETWORK SERVICE
.
Some of the EWL developers use an internal product called the EWL System Manager, which builds, tests, and deploys EWL systems automatically. It’s like an ultra-opinionated version of Heroku or AppHarbor. It can be run in the cloud or on-premises. Let us know in the forum if you are interested in using this.
If you’d like to learn how to build a web application, check out the web framework guide. Or see the table of contents for a full list of documentation.