

Ask HN: Anyone developed larger web app with a micro framework? Thoughts... - snapple

Hello HN,<p>I am kind of stuck and could use some advice from the community.<p>I have an idea for a larger web app (multiple auth methods, a lot of dynamic pages with forms, etc.) and would like to develop it using ruby as a main language for the backend.<p>I developed few websites before with PHP, using various frameworks, such as Zend, Kohana, CI. I've also used ruby for small personal projects and tried both Sinatra and Rails. Between the two, I prefer a small micro framework as it gives me a feeling of a more control and less of a glue-together things approach.<p>I know that Rails would be an ideal framework for this kind of web app, there are a lot of gems that solve most common features (auth, forms etc).<p>So I wonder if anyone here went with a micro framework route and had no regrets at the end, even if a lot of time was wasted by re-inventing the wheels.<p>Another issue is the structure of code / files using a micro framework. I would hate to end up having insane amount of folders / files that would end up looking just like Rails, but the idea of throwing everything into a single file is also questionable.<p>So any thoughts and suggestions are more than welcome.
======
hayley
Since it sounds like you haven't yet started coding, I would argue that the
most important question to ask yourself is which framework makes you most
excited about jumping in and coding something _now_.

Since both frameworks are Ruby, I'd hope that it wouldn't be too big of a deal
to decide to change from one to the other in the middle of the project, unlike
a full blown language change.

Me personally, I came from the Python world and started out with Ruby on
Rails. But I didn't spend enough time with it to ever get out of the stage
where it felt like I was working with a black box.

I tried Sinatra on a project and quickly "clicked" with it and I haven't used
RoR since.

My biggest project runs on Sinatra, but the caveat there is that probably
90-95% of the current code has nothing to do with the framework.

I have seen the number of files grow to the point where I start wondering if I
would've been better off with Rails where there would be a specific location
for everything. On the other hand, I get to decide where stuff should go, and
more important to me is that everything that is there is something _I put
there_. Whereas, with Rails, I found I was wasting time trying to wade through
all of the skeleton files to find where I had actually written some code. But
again, I chalk that up to the fact that I never moved out of the black box
phase.

As to reinventing the wheel, depending on your motivation, reinventing the
wheel isn't necessarily so bad as you'd learn a lot along the way. And if you
_enjoy_ it, then I'd argue that would be more important than being half
hearted on something where gems already exist for what you want.

So again, I'd say to pick whichever one motivates you to get started _now_.

Good luck.

------
maxdemarzi
A large web app can be broken down in to a collection of small services.

You have a main Rails app as the glue and these small services can be done in
Sinatra fulfilling specific needs of the App.

