speeds up development (a lot) How? They implement and/or simplify most of the tedious tasks and boilerplate. • Data manipulation • Templating • Security • Session management • {insert a tedious but necessary task to do}
of development patterns/philosophies/principles. • If you want to replace one core component, additional work must be done. • When a core component is replaced, some “magic” is gone with it. And replacement magic isn’t as good as the default one. • Implementing your own magic/extensions/etc require from little modification to mashing your head on the table. (the previous statements may not apply to some frameworks)
cool features are built on top of a rigid, stable base. (Comfortable, too) So, it begs the question: Should I remove the cool things for customization?
have two ways: • Roll Your Own ◦ If it doesn’t remove core features: ▪ Awesome! ◦ If something else breaks in the process: ▪ Welcome to Stack Overflow. • Use a microframework
aspects of your project with little or no additional work. • NoSQL databases • Custom templating engines • ViewModel paradigm • Custom user management • or nothing at all
code will be small. With an MVC framework, your project starts at almost medium size and then it grows from there (big projects won’t even notice). (most of the time)
hello index $vim app/controllers/hello.rb (write the code) $emacs routes.rb (write the route file) $rails s #Success If we use Rails, we should do something like:
need to create a project, then an application, then edit the controllers, add the created application to… (it keeps going on) With Flask, you need to do this after getting it using pip or easy_install (maybe not easy_install). from flask import Flask app = Flask(__name__) @app.route(‘/hello’) def hello(): return u’Hello!’ if__name__ == ‘__main__’: app.run()
this: 1. Create a project with your favorite IDE. 2. Get Nancy from NuGet 3. Create a new file (C#) with the following. namespace Hello { public class HelloModule: Nancy.NancyModule { public HelloModule(){ Get[“/hello”] = _ => “Hello!” } } } Press F5, get bacon.