NFX Demo Apps and Use-cases
Here you can find different demo projects that cover basics and some advanced scenarios of NFX library using. With NFX you can develop any web or desktop application with minimal effort. For more on NFX please see
- https://github.com/aumcode/nfx - the latest public version of the library.
- https://www.youtube.com/user/itadapterinc - related videos.
- https://github.com/aumcode/serbench - NFX ultra-fast serializer benchmarks.
NFX.Wave technology allows to develop Web applications. It contains a fast web server with handy view engine, classic MVC and no MVC pattern implementation, flexible templatization engine, requests filtering and handling, security and many other features. You can find NFX.Wave demo projects in \Wave solution folder.
Wave.HelloWorld - the simplest NFX.Wave application that outputs "Hello WAVE!" message to your browser. MVC approach is used.
Wave.HelloWorldNoMVC - the simplest NFX.Wave application that outputs "Hello WAVE!" message to your browser. No MVC (no controllers) approach is used.
Wave.FilteringAndHandling - the application demonstrates advanced scenarios of HTTP requests filtering and handling. Filters and handlers are configured in *.laconf configuration file.
Wave.Logging - the application demonstrates basics of NFX.Wave loging capabilities. Logging is configured in *.laconf configuration file.
Wave.ViewEngine - the application demonstrates different capabilities of NFX.Wave html templatization engine. You can embed any code in your html template pages, which then will be rendered by server into a valid html. You can also embed a piece of html into another views for reusability purposes (partial views).
Wave.DbApplication - a simple web application with MySQL database backend. The application demonstrates working with simple CRUD operations over MySQL database.
NFX.Glue technology allows to develop distributed, service-oriented applications in a simple and efficient manner with minimal effort. You can find NFX.Glue demo projects in \Glue solution folder.
Basic demo solution includes three projects:
Glue.Contracts - contains contracts shared between server- and client-side such as service contracts and data contracts.
Glue.Server - contains implementation of service contracts and also provides console host for them.
Glue.Client - contains auto generated clients for the services and a simple WindowsForms application that demonstrates some basic capabilities of NFX.Glue technology.
Rebuild Glue.Contracts and then run Glue.Server and Glue.Client projects. Tabs in the client application contain some examples of NFX.Glue techology usage:
- Echo Test - A simple echo server. Type any text in the textbox and press 'Send' button. You should see server response below.
- Stateful Test - Stateful server stores its state for each client.Client should call method decorated with ConstructorAttribute before any other. Press 'Init' button to do it. Then press 'Add' button to change integer state of the server.You can get current state of the server by pressing 'Result' button.After you press 'Done' button the server will become unavailable for the current client (deallocated). You can verify it by pressing 'Add' or 'Result' buttons after pressing 'Done'. What is interesting is that stateful servers SURVIVE the process RESTART as they keep their state in the ObjectStore which is a part of NFX Application container
- Data Contract Test - The demonstration of non-elementary types transferring. Fill some person's data below and press 'Add' to send it to the server. Enter some text in right textbox and then press 'Find' to find stored persons by name.
- High Load Test - The imitation of high-load server. Enter iterations number and press 'Start'. You can also choose between parallel and syncronous version of the test. Do not be surprised to see tens of thousands of 2 way calls a second even on a simple machine
- Security Test - The demonstration of NFX Security model in case of NFX.Glue server.You can add users with certain credentials and permissions in security/users section of *.laconf configuration file. You can then seal any server methods or the whole server by applying PermissionAttribute which guaranted that only users with appropriate permissions can access the methods.