How to choose the right web framework for your next project

I love trying out different frameworks and tools every now and then, for many reasons, like me being an “avid learner” or a plain curious developer, and of course to evaluate which framework and/or toolset will save me time in my next project.

The question that I’ve asked my self saw it being asked countless times is “What framework should i use for my next project/startup?” or “Should i use X over Y? and why not” which lately i’ve found an answer that at least made sense to me and i wanted to share with anyone who’d like to get an answer or a starting point to form their own answer. 

tl;dr choosing a framework for a startup is more of a business decision than a technical decision, it absolutely involves taking money(=time+effort) in consideration, once you grow into a huge success and money is no longer a problem, then your problem is purely technical and you can afford to go with whatever framework you want or even brew your own, if you’d like to know what’s my personal conclusion jump straight to the end.

So here are 10 tips and questions i think you should know and ask your self before choosing your next framework, please note that it’s almost impossible to satisfy the 10 points, even though some points are variables and could change depending on your skills and where you live, but if you can find a framework that satisfies 8 or 9 then that’s great, and if you can find a 10, then you are a one lucky SOB.

  1. Syntax: of course a language with a beautiful syntax -Ruby- would make your life as a developer easier, but sometimes this could be your enemy in disguise, if you think 
    “this is text”.split(’ ’).reverse.join(‘ ‘)
    is better than -or worse-
    “ ”.join(“This is text”.split(’ ’)[::-1])
    then you are just looking at the eye candy, your application isn’t only about the syntax, it’s about more than that, you only should worry about a language that has a limiting or very verbose syntax, common sense suggests not using brainfuck -parody-, and it makes your life much easier not to start with a language that takes far more lines of code to accomplish trivial tasks this will leave you with more lines of code to maintain by your self or small team of developers.  
  2. Functionality and size: do you have to write complex regex queries in your router? or does your framework ships with a builtin DSL for the router? maybe it has no built in router at all? what about ORMs? do you like to use an ORM out of the box? or you prefer to have it as an option? maybe you’d like everything but the very basics to be optional! and just start with a minimal framework that you could add tools to.
  3. Documentation is king: a well documented framework could make up for almost everything, i remember learning CodeIgniter, it was very well documented that i had no reason to look for answers outside the packaged user_guide folder, there were answers to everything, the formatting was consistent and the each function had an example or two, unlike when i was looking at ExpressJS documentation which seemed very lacking and i had to always look for examples outside the official documentation or like Django which had great tutorial but it was overwhelming for someone who started to use python/Django -To be fair, Django documentation and tutorial as of recent versions improved a lot-.
  4. Code generation : frameworks that usually ship with strong code generation scripts saves you a lot of time, some even go further to “eliminate" the actual code leaving you with generic controllers/classes, while this is a lot of magic, and might be hell to customise, it might be what you are really looking for to get your prototype up and running.
  5. Modularity : I love the way Django handle Modules/Apps which makes it really easy not only to reuse your code, but to also think about your application in a more modular way, so if you decided you no longer need that X module, taking it out and refactoring your code should not take much effort and file seeking. 
  6. Infrastructure : choose your gang, are you going to go with L/WAMP (Linux/Windows, Apache, MySQL, PHP/Python) or MEAN(MongoDB,ExpressJS, AngularJS,NodeJS) or maybe you’ll use Rails Puma/Unicorn/Passenger Nginx, or just let your Nodejs app face the web directly without even wanting to use anything else -which is something not highly recommended-, what really matters is your knowledge about this stack, and ability to maintain it’s components, also it’s worth noting that sometimes your infrastructure affect the way you code, for example if you go with MEAN stack and you have JavaScript both on server and client side, you unify the language you use to code front end and backend logic which might help you in finding developers who work in sync together and also makes it easier on your brain to go back and forth between backend and front end code. 
  7. Community and patches : how strong/active is the community that supports this framework? how long have they been there? do they have -had- key people like “_why” of Ruby? do they help each other in the official forums and/or do they actively engage in answering related stackoverflow questions? it might be a bit hard to answer this question, but most of the time numbers don’t lie; the dates and frequency of engagement would be a good indicator as well of course the quality of the way things are answered or discussed, also, how fast are patches released? fixing bugs and security holes is not something to be taken lightly, you don’t want a 13 years old script kid to exploit your website and wipe all your data to show has friends he can do it!.
  8. Breaking changes : just today i am sure some coders went crazy or flipped their tables when they heard about Angular 2.0 breaking changes, to have a working framework change that drastically is really troubling, even though the change is yet to be made by late 2015 but still knowing that your current code will be rendered obsolete when the new version comes out is a no-no, unless we are talking about a long window of time (5-10 years), another example would be Yii framework, which took three years to reach version 2.0 and was a total rewrite of the previous version(s).
  9. Deployment and Dependencies: this ties with the infrastructure question, how easy is it to deploy your code? and the forever annoying question “Will it scale?” even though the scaling part is called “the happy problem” but having this thought of doesn’t hurt unless you are over obsessed about it and it’s blocking you from choosing what to do next, How much time are you willing to invest in learning deployment tools?, how long and how much effort does it take for your stack to be ready before it gets configured manually or by your deployment scripts? although tools like docker might answer this question, but it’s worth asking specially if you for whatever reason choose not to use docker or similar tools.
  10. Developers : Is it easy to find developers who are going to help you in your project? remember talking about syntax in point 1? so you liked the amazing mysterious sexy syntax of X language, overlooking a lot of other factors you started working with this framework, you suddenly decided you needed more developers/help with your codebase, and to your surprise you find out that people who know how to work with this language in your country and/or in your pay range are virtually non existent, while you always could train developers but this is a time and effort consuming process that you might not be able to fulfil. 

Personal conclusion:

If all i want to do is a medium site with dynamic content and just forget about this website while it works, i’d choose Django.

If i am not sure about how big this website would be or how much i’ll be involved in it, i choose to go with Rails, Rails is a very powerful framework that has been there for 9 years for now and it doesn’t look like going anywhere, it even -literally- ate the competition -merb- and became more feature filled language and became the de facto full stack web framework for the Ruby language, although it’s really hard to find Ruby on Rails developers in Palestine, but since the framework is really capable of saving my time, It’s a sacrifice that i am willing to take. 

And if all i want to do is a SPA then i choose the MEAN stack, since i’ll be working on the fronted more or equal with the backend it makes more sense to go full JavaScript.

Final words: 
Thank you for reading the whole post, I’d really love to know your comments and i apologize if my writing skills aren’t as they supposed to be, English is not my first language, Arabic is. 

My startup didn’t die, it’s just frozen!

Startups are fragile “creatures” that you should handle delicately … while running at full speed!, SeenLab “was” supposed to be a dream that come true, but like many things in my life, the closer i thought i was getting to reach this dream the further it was getting away from me, i broke down the problem so maybe this could benefit another “comrade” entrepreneur who’s going through the same difficulties i am going through right now:

I’m a bad manager.

I am, i failed to manage a lot of things in my life starting form my weight going to my “love” relations to my sleep hours to almost every single thing, i think the only reason i am alive until now is because god is trying to make an example of me, a good or a bad example i have no idea yet.



 My partners are my best friends, but they are not the best partners

I’d die for my friends, i’d seriously do, the more shit i say about them the more i love them, just like when someone talks about his family but he loves them to death, but the fact that my partners are my partners because they are my friends is idiotic, if i can go back in time i’d partner with different people of different skills, i’d partner with someone i don’t necessary like but i know is a great manager, and i’d partner with a developer who’s better than me or at least as good as me, this way we can accelerate the way things are moving and my friends can help me without exhausting the resources of the startup, which i also exhausted and badly managed. 

I would’ve chosen a different problem/opportunity 

I was so consumed by the idea of getting accepted into FastForward that i had to manoeuvre and make sure i’ll get accepted regardless of my true passion, i did it, i won, how? i don’t really know but i guess i worked my ass off during the three days of the selection event, i impressed people, and finally i think there wasn’t any serious competition so we were picked automatically, of course this last reason might sound very degrading to us and sinister of them but i mean it in all the good ways and none of the bad ways, but the bottom line of this point is, i had to choose a different problem that’s more in my domain, Online Education is awesome, but WTF? i want something that has more to do with Music or Media in general! or social news … yummy.

Life got the best of me

I was hit by a series of problems, a non ending barrage of problems at a short period of time that felt like thousands of micro hits to my “chakra”, love is gone, got 30!, geo-political situation … and many more stuff that i don’t feel like discussing with total random strangers, i discussed a lot already, i even made fun of my problems.

ADHD

This alone can make you retarded in no time, while i was writing this post i was doing 10 things at the same time and moving all around the place with my brain …


SO yeah, all this have been said? what now? stop? go home and cry about it? 

well i wish i could do that, but this isn’t going to happen, i decided i have to take it like a man, and steadily get back on track, reorganize and see how could i solve this mess i am in, you are welcome if you want to help, hell, if you read up until here that means you might be able to help! i want SeenLab to be success, if not a financial one at least a community one, other than that, I AM NEVER GIVING UP MOTHERFUCKER.


image



Rami GB aka “Brother of the night wolves”.

Opensource chrome extension with AngularJS + Underscore

image



I have a lot of bookmarks, and the native extension (Bookmarks manager) feels a bit stupid to use, so i decided to “hack” my own, i used Yoman! to scaffold the extension and then i added AngularJS and started reading the Chrome.bookmarks API, the whole process took me 3-4 hours on and off, but it was fun experience, i uploaded the source code and published the extension and i hope it will be useful to someone.

Extension it self - Google webstore
Source code - Bitbucket

I truly appreciate any comments since it’s my first time publishing a Chrome extension.

A sense of urgency …

It is not the idea, it’s not the amount of seed money, and it’s also not the accelerator/incubator/whatevator you are in that makes you work when you don’t feel like working, it’s the sense of urgency!, the feeling that you have to get things done and move on, “sprint”, stay up plotting and dreaming, a wise man once said “Dream is not that which you see while sleeping it is something that does not let you sleep.”

I don’t see this sense of urgency in many of my colleagues, it doesn’t mean i am better than them or smarter, it just means i figured out something they didn’t, i’ve learned through my mistakes, they didn’t make enough mistakes to learn, perhaps, or they just didn’t learn how to appreciate time.

Now don’t think i’m a success story walking on two feet -yet-, don’t think i’m a “know it all guy”, and what’s most important than all of that don’t think i utilize time as i should be doing! … I try my best to, i work the hardest, I also play a little bit, and waste time a little bit, but what i want you to learn from this post is the following, DO stuff, DO them fast, deliver your ideas to the world, get the feed back, improve, while you keep DOING stuff and DOING them fast AND … you get the idea :)

Before i close this one, i’ll share one of my VERY favorite quotes …

The ape, the banana, and the two sticks

zoorna:

“When you’re thinking about something that you don’t understand you have a terrible, uncomfortable feeling called ‘confusion’. It’s a very difficult and unhappy business. So, most of the time you are rather unhappy, actually, with this confusion you can’t penetrate this thing. Now, the confusion…

About

My technology related rants