Coder Social home page Coder Social logo

tjakopovic / rhetos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rhetos/rhetos

0.0 1.0 0.0 8.12 MB

Rhetos - A DSL platform

Home Page: http://www.rhetos.org/

License: Other

C# 98.11% HTML 0.63% Batchfile 0.38% PLSQL 0.30% SQLPL 0.03% CSS 0.08% JavaScript 0.43% ASP 0.04%

rhetos's Introduction

Rhetos - A DSL platform

Rhetos is a DSL framework that enables you to create your own domain-specific language to build server applications. After an application developer describes the application in that language (DSL script), Rhetos will use it to generate the application, including the application's database, business layer object model (C#) and web API (REST and SOAP). It also has a robust built-in system for handling upgrades and customizations.

A client application and GUI are not generated by Rhetos. In future, we plan to implement plugins that will simplify usage of the REST and SOAP interface for client application developers.

Rhetos comes with the CommonConcepts DSL package, a language that contains many ready-to-use features for building applications.

Rhetos is based on Microsoft .NET technology stack.

See rhetos.org for more information.

Recommended plugins

DSL packages:

  • CommonConcepts (placed inside the Rhetos repository) contains basic concepts for building applications.
  • SimpleWindowsAuth or AspNetFormsAuth (placed inside the Rhetos repository) provides authentication and authorization features to Rhetos applications. Both packages cannot be used at the same time.
  • RestGenerator automatically generates REST API for all entities and other readable or writable data structures that are defined in a Rhetos application.
  • MvcModelGenerator automatically generates ASP.NET MVC model for all entities and other queryable data structures that are defined in a Rhetos application.
  • ODataGenerator automatically generates OData interface (Open Data Protocol) for all entities and other queryable data structures that are defined in a Rhetos application.
  • LegacyRestGenerator, an old version of REST API, available for backward compatibility.

Other tools:

Installation

Prerequisites

  • Windows Vista or newer with the latest service pack.
  • IIS 7.0 or IIS Express.
  • .NET Framework 4.0.
  • Admin access to Microsoft SQL Express (version 2008 or above), Microsoft SQL Server or Oracle Database.

Basic information

There are two important scripts in this project that enables Rhetos server and give you jump start. One of them is Build.bat that builds source and places some binaries in right place in directory hierarchy. Second one is SetupRhetosServer.bat that will set up web environment using IIS Express. It requires few parameters based on which it sets up database, configures Rhetos server and sets up IIS Express local config which is enough to start Rhetos server and developing.

So, there are following steps to install and run Rhetos server:

> Build.bat
> CD Source\Rhetos
> SetupRhetosServer.bat <WebsiteName> <Port> <SqlServer> <DatabaseName>

SetupRhetosServer.bat command-line arguments:

  • WebsiteName - name of website in IISExpress config (choose any name, it is not directly related to URL of Rhetos web service)
  • Port - port that Rhetos web service will be listening to if using IIS Express (1234, for example)
  • SqlServer - Microsoft SQL Server instance on which there is/will be database for Rhetos server
  • DatabaseName - name of database that will Rhetos use, script will create database if it doesn't exist.

Directory hierarchy

You can check out source in any folder you like. It might be weird that above mentioned essential scripts aren't both in root folder. Only Build.bat is. Reason lies in fact that after you build complete solution, it is not necessary to build it again. In other words, Rhetos server can be run as website in IIS Express or IIS, and for that only subfolder Rhetos of Source is required. Therefore SetupRhetosServer.bat script which sets up development environment is placed inside that folder. Following is directory hierarchy:

* Rhetos
 \
  * CommonConcepts
  * External
  * Source
   \
    * Rhetos
     \
      Rhetos.csproj
      ApplyPackages.bat
      SetupRhetosServer.bat
      ...
  Build.bat
  ...
  Rhetos.sln
  ...
  Readme.md
  ...

Development environments

As you may have read before, Rhetos can run on IIS/IIS Express. While IIS is much more configurable, SetupRhetosServer.bat prepares config for IIS Express. Main reason is that IIS Express is very light, but has enough functionality for Rhetos server. Same applies to database.

If one wants to use IIS instead of IIS Express or manually change database it is possible and more information about Rhetos configuration can be found in this readme and on rhetos.org.

Configuring your project

For basic usage or testing if Rhetos works, just run SetupRhetosServer.bat. After running this script and before running Rhetos server, you can manually configure IISExpress.config. It is template config for IIS Express site with modified <sites> section and added <location> part at the end of config. Those two defines which port on localhost Rhetos will be listening and that security used is based on windows authentication.

If one prefers to use IIS following steps are required:

  • Create ApplicationPool of .NET Framework v4.0
    • check "Enable 32-Bit Application"
    • set user with admin privileges as Identity
  • Create new Website or use existing one
  • Create new Application with following:
    • set ApplicationPool to one created in step one
    • set Physical path to Rhetos\Source\Rhetos folder
    • set Path credentials to user with admin privileges
    • disable directory browsing
    • in Authentication enable Windows authentication and disable others
  • Set URL path for <client> <endpoint address> in Rhetos\Source\Rhetos\Web.config accordingly

If one wants to use different database it is defined in ConnectionStrings.config in Rhetos\Source\Rhetos\bin folder.

Note that besides configuring IIS and Database, SetupRhetosServer.bat also deploys CommonConcepts and user defined packages to that database. If one chooses manual setup it is necessary to run ApplyPackages.bat in Rhetos\Source\Rhetos.

Run Rhetos server

Once configured, Rhetos server can be started by running following command in cmd while positioned in Rhetos\Source\Rhetos:

> CALL "C:\Program Files (x86)\IIS Express\IISExpress.exe" /config:IISExpress.config

Note: Use the "Program Files" folder on 32-bit system.

If using IIS then just start site in IIS manager.

License

The code in this repository is licensed under version 3 of the AGPL unless otherwise noted.

Please see LICENSE.txt for details.

How to contribute

Contributions are very welcome. The easiest way is to fork this repo, and then make a pull request from your fork. The first time you make a pull request, you may be asked to sign a Contributor Agreement.

rhetos's People

Contributors

bantolov avatar davorpr1 avatar sstublic avatar kmeze avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.