How to create a web application framework - rust

I want to attempt creating a framework like Ruby on Rails but for Rust. I know it will take long and it's a lot of work but I figured it would help me better understand the abstractions that are used in frameworks and reasoning behind framework developers' decisions. By building a framework I will also get to learn lots about the framework I'm building. The only projects I've created with Rust is Philip Opperman's Rust OS, a Ray Tracer and a sudoku game using the Piston engine. Can anyone give me some tips/pointers on how to go about this project or where to start? I want to build it specifically for API development.

Related

MVC practices through Node?

I'm a front-end developer with a desire to learn more on functional programming and template engine processing through JavaScrit.
I'm currently learning the Node platform, which I initiate through Visual Studio Code terminal to build custom JavaScript apps. But I want to take Node further. Does Node provide any good resources on building an MVC (Model View Controller) like applications?
Just to give a little background, I just finished a course in MVC 5 for ASP.NET (which I really enjoyed through Visual Studio 2017), but would like something similar to that which is JavaScript based.
Thanks for any recommended resources! I want to make sure what I am diving into gives me the end goal I am looking for.
Thanks again!
On top of node.js you can use different frameworks, one of the most important is express but there are many others, look at nodeframework.
Then I suggest to use some best practices. Personally I've found really useful the following for express:
https://github.com/i0natan/nodebestpractices#1-project-structure-practices

Haxe for enterprise application development

Is there anything available for Haxe which would be suitable for real-life enterprise application development? (i.e. A professional high level UI component framework.)
Just a note - I know we all love our tools of choice, but please try to keep it objective.. don't just recommend Haxe for something without thinking about whether it's really an effective tool for business requirements.
On one hand, as Jason suggested in his comment, there is missing a haxe-based native UI framework.
On the other hand, we don't really need a haxe-based UI framework, but using the UI framework available to the target platform is enough. Unlike building a library, which is better to be target independent, building a "real-life enterprise application" only requires targeting a specific platform. Since UI is highly dependent on the target platform, it means that we should use a target-specific UI framework. For example, the best UI solutions to an web app are probably jQuery, ReactJS, AngularJS etc., which all can be used in Haxe (jQueryExtern, react.hx, angular.haxe). For Flash/Java/C#, we can simply use any "native" libs by -swf-lib path/to/lib.swc, -java-lib path/to/lib.jar, and -net-lib path/to/lib.dll. For C++, however, although there is continuous improvement (watch the wwx2014 talk), it is still somewhat hard to use native libs.
We are making games in haxe + OpenFL + StablexUI. Not sure if it suitable to post their urls, so that you could see the quality. But it helps if you need your custom ui not native (iOS, Android).

New to coding trying to learn JS and node . . . do I need an IDE or will Sails.js do it all?

I'm completely new to coding and I'm wondering if I will need an IDE or text editor if I'm using something like Sails.js (a real time MVC framework) in the attempt to build a node app. It seems like the IDE/text editor functionality is built into Sails.js. For more on Sails (http://www.sailsjs.org/#/).
Btw, I'm not looking to grow into a CTO but rather I'm a DiY entrepreneur that wants to build an MVP and go about building a team or raising money with prototype in hand. I care nothing for learning great practice or fundamentals of programming besides what's pragmatic for the express goal of building an MVP as I have no interest in being a career programmer. Having said that, I'd like my MVP to work and I don't want to do something dumb either.
Thank you for the guidance!
Sails is a web framework. You will need some kind of text editor in order to write code to handle each request. I suggest you start a level up and learn the basics of what a language is and how it plays into building an app before you select a framework or runtime.
Something like http://www.codecademy.com/tracks/javascript can get you started.

existing frameworks for a questionnaire style app for web and mobile

I have a project where I can work on rails or nodejs to build a questionnaire style app, where the admin can post questions, check for top score, average scores and the user can take the questions. I have a basic knowledge on both rails and node but not good enough to build a fully functional app. I am working on it, but would like to know any good frameworks that would help me make the building process quicker, either in rails or nodejs. I did come across devise and surveyor in rails. please do suggest good starting points or other frameworks that would be useful in both rails or nodejs.
How about using sth like https://github.com/patocallaghan/questionnaire-js
This is a purely (client) javascript framework (using MVC frameworks underneath, like Angular).
On server-side one would only need to validate and save the data.

HTML5 canvas and BDD - Cucumber

I was learning about Behavior driven development (BDD) recently, i see that its good for CRUD web application.
Is BDD tools such as Cucumber suitable for games, specifically are they good for HTML5 Canvas games?
Is there any other BDD tools for HTML5 canvas games? Or Is BDD only for CRUD applications?
I've just recently been experimenting with BDD and Games Development. But I'm building on the .NET & XNA Frameworks with C#. I'm using Visual Studio as my IDE and testing with SpecFlow and NUnit.
SpecFlow is the BDD/Gherkin tool - and as a group we've been talking about the game and fleshing out some requirements and documenting them in Gherkin... and going from there. The key is designing the game to be testable.
We've abstracted the game engine away from main "game loop" implementation that XNA requires so we are able to load it up and inject all of the dependencies it requires. We then run the tests on the engine and make asserts on the code afterwards to make sure that it is behaving correctly.
We decided early on that Graphics/Drawing/Sound/etc were out of scope of the testing... if they were broken in the end product, it would be very obvious. The test suite we've managed to build up just gives us the confidence that the mechanics of the game itself are working as intended (i.e. is game object A in the right location? does game object B die when hit with projectile C? etc. etc.).
So far it has been quite a good experience.
The question is: can you think of ways to interact with the canvas-based game in JavaScript?
Practically, could you open the JS console and interact with the game from there? Can you fire clicks at the right coordinates, can you press keys and most importantly, can you make assertions on what's being output by the game?
If the answer is yes, then you are able to automate the game in JavaScript and either Cucumber or Cucumber.js can definitely be used on top of that.
If the answer is no and you can't figure out a way to automate the canvas content in a similar fashion than what described above, then I'm afraid no automation tool could do the job.
To answer your second question: BDD has absolutely nothing to do with "CRUD" applications. It's about describing behaviours and automating examples that illustrate those behaviours. You can therefore take a BDD approach on virtually any types of application.
Shouldn't you find a way to automate your application, you could still consider writing scenarios to document the (expected) behaviour of your app. The automation phase is not mandatory, contrary to common beliefs :)

Resources