HN2new | past | comments | ask | show | jobs | submitlogin
Let's scaffold a Web App (yeoman.io)
76 points by tilt on Feb 22, 2014 | hide | past | favorite | 26 comments


These generators are excellent tools to learn how to organize your code, setup your tools, etc. I have used Yeoman and am amazed at how the community has grown. I'm a big fan of Addy Osmani as well.

HOWEVER a "scaffold" doesn't really teach you how to use OAUTH to authenticate with Facebook, handle sending emails (welcomes, password resets, etc.) or even how to really build something. Instead I'm a big fan of working site examples:

Drywall: http://jedireza.github.io/drywall/ Hackathon-starter: http://hackathonstarter.herokuapp.com/ Skeleton (Mine): http://skeleton-app.jit.su/

You get all the scaffolding + real working code for all the basic site functions. You then build from there.


Wow, I was just looking for something like this. So far I am liking yours (Skeleton) the most as someone without any experience in this domain.

Thanks a lot!


Cool! Let me know if you have questions.


It's always funny when you use one of those little tools to scaffold a little app and then realize that 500M of disk space were used to setup a simple hello world example.


Love Yeoman. One of my favorite generator is the JekyllRB Genrator[1]. It leverages the power of Jekyll with Grunt and Bower.

1. https://github.com/robwierzbowski/generator-jekyllrb


yeoman seems to be involved very little, in this tutorial. It seems more like a bower/grunt tutorial. I was expecting to see yeoman used to generate models, views, and controllers. It's a shame because, I think this is where yeoman could really shine.


It's strange how so many people bag on rails and say its generators are useless but so many other techs have spent years trying to replicate that style of app development.

I enjoy using generators btw.


A friend and I get a lot of use out of a set of Backbone.js generators we created[1]. Even once you know what you're doing, I find generators a much more reliable way of producing the underlying code for projects.

1: https://github.com/th3james/BackboneDiorama


Generators definitely have their place. They're good for prototyping, and creating internal tools. Tasks that are time sensitive and can really benefit from eliminating boilerplate code.

Larger LOB, or public facing apps require more thought and planning to ensure that they get the job done right.


You don't have to treat generators as CRUD only things though.

What's wrong with creating an app generator that spits out enough stuff to get you going on a certain app?

If I don't have to spend 15 minutes making a bunch of small changes and additions every time I make a new project then I will be more likely create more projects.

It's part of the reason why building a SOA is painful. If you have 25 services that means you need to start 25 new apps. It might take 20 hours of boilerplate garbage that you have to do just to start developing the business logic.

With generators you can turn that into almost no time at all, you would be bound by how fast your hard drive can write the files to disk or how fast you can pull things from github.

Btw I also use generators for public facing things. Why? Because typing 1 command which generates 6-7 files and also gets me going on what needs to be replaced is a lot faster than starting from absolutely nothing.

It doesn't matter if I end up replacing 100% of the view code or 90% of the controller code. Also if I feel like I will be doing a lot of CRUD'ish things in similar ways then I will spend 15 minutes once up front and create custom generator templates for that specific project.

It's nice to be able to type 1 command out and get a fully working scaffold with your custom theme and changes already applied complete with elastic search integration and faceted navigation, etc.. I do this all the time when applicable.


Agree, i already jumped to the gulp + broweserify wagon and i love it.


to scaffold an app in php, `vim index.php`


Nope. 'artisan' is the command you want. Oh, you're not using Laravel? You should be.


Why should s/he be using it? Because you think if it suits your requirements it must suit everyone else's?


It's called hyperbole. Which is also what my parent was doing.

And actually, for most cases, yes using a framework is a better choice for nearly any skilled team with PHP: it's too easy to get it wrong, and now you have a massive security breach. See any exploit database for examples.


But you didn't say use a framework. You said "use this exact framework" with no idea what they were going to build.


Symfony has similar generators as well.


Yeah, Symfony/Silex are great too.


This is what's wrong with so much php out in the world I encounter on moonlighting gigs. Everyone crams it all into index.php

Maybe you were joking, but to call editing an index.php file a scaffold is scary (although highly profitable for me!)


"although highly profitable for me!"

Is it really? Personally, I've found that many of the projects which hired those sorts of developers either have little budget to start with, or have little budget left for a 'version 2' or 'clean up version 1' effort, because they spent most of it on the earlier garbage. Certainly plenty of work available to do that sort of clean up, but it doesn't strike me as 'highly profitable' on the whole.


I don't budge on my rate. If they are limited in what they can pay, I'm limited in what I can fix, or I simply don't work for them.

Again, I only do these projects as moonlighting, this isn't my primary source of income. People contact me to fix their sites based on referrals and they know my rate before they contact me. I don't go out of my way to scour craigslist/odesk/whatever for jobs.


Because it's better cram everything in a server.js file ! sure.


I think that you would have to make the scoffold command yourself, there is a guide on there website that teach you how to make your own yoeman scaffold, to fits your needs.


Not a php dev. You get asset compression and scss compilation natively from php? That would be pretty amazing!



Is there a reason the todos list is a list of text inputs? It makes sorting them awkward because there's so little area that's draggable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: