Ask HN: How do you begin the process of developing a web application?
I'm curious about others processes for beginning the development of a web app. It's always hard for me to "just dive in" and start, so I'm curious to get some feedback from the community.
After you have the initial idea, what's next? Start defining features? Draw up a mockup on a piece of paper? Start writing the DB schema?
73 comments
[ 3.1 ms ] story [ 167 ms ] thread1) Idea
2) Write a small paragraph explaining the idea
3) Derive features
4) Make todo list
5) Make mockups using mockingbird (awesome tool)
6) Write some code
7) Get bored and go back to 1) (not recommended)
Between 5 and 6 It should be better to work on the design rather than code. Code should be last imo. Also I hope someone could erase step7 and actually launch the product :)
I'm generally driven by seeing something working, even if it's only working enough that I can see some data on a page or have a single button that makes something happen.
If I can keep a good decoupling between my views and my models it's pretty easy to go back whenever I get the itch and make things look nicer without touching anything else. Unless you have a lot of javascript doing intense dom operations on a page you should be able to redesign it at will without worrying about breaking anything else, so I don't really worry about getting it right the first time, or really any time unless I'm getting ready to show it someone who's going to judge it on visual rather than functional grounds.
I've found (and, again, this may only apply to me and not you) that leaving design for later helps keep me from getting bogged down in details and losing my steam. If I have a very concrete picture of how something should look in my head I start worrying about getting my boxes to line up right and why my line heights are off and all that stuff that doesn't actually contribute to getting anything working. If I've purposely left the design aside I've in essence given myself permission to be okay with things looking crappy until I feel like fixing it, which helps keep me going on things that actually contribute to working code.
If you have a design which looks awesome, at least for me, I have greater motivation to get it work. The more detailed and comprehensive the design is, the more eager I am to make it work.
But again, this is what works for projects I've done for clients. Personally I don't have any good finished projects, none of the methods I tried worked there.
2. google the idea
3. html mockup
4. code
1. idea x
2. google idea x, find nothing
3. spend 2 weeks working on it
4. realize your idea isn't actually x, but more like y.
5. google y, find a bunch of people have already implemented it.
I think the biggest reason I enjoy doing this is because I'm driven by visible progress. I do just enough DB work to then do a little bit of coding so I can do something in the app. Basically giving my self little feature goals here and there.
"Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowcharts; they'll be obvious." -- Fred Brooks.
Usually on the interface side there's a separate process that meets in the middle. I'll often either do some dummy HTML pages or (yeah, laugh) Keynote slides that give me an idea for the interactional mechanics.
That said, and it probably shows, my strong suit is in developing libraries, not applications, and I tend to paint with that brush even when doing apps.
Then I call the library in different ways to build something useful out of it.
Never thought of it that way, but that makes sense to me.
I let it sit around in my head for a few days/ weeks... If it keeps bothering me then I try and get the core of the functionality down as quickly as possible -
I get something online which I show my friends and family. Once I've taken, or not taken, their advice I move forward.
I push forward a bit with my gut feeling and get my girlfriend to work on the design. (She's an awesome designer, I'm really lucky!)
I flesh it out around the edges, user registration, 404, 500 error pages whilst I'm waiting for the designs. (Or I just work on something else.)
And then I'm in "beta."
2. list features in order of importance
3. select top 50% of 2.
4. paper mockup with various iterations
5. code
6. revise with external feedback (usability study?)
7. go to 3/4/5.
1.5 Put that sketch on my "ideas" wall. Most ideas never make it. But for the ones that do:
2. Set up local domain mynewsite.peter, and optionally put codeigniter on it.
3. Put 1 or 2 html pages up.
4. Create a database table or two, code some functions that call it, and get something working.
Now I have something working, I iterate on it finetuning it for a while. And if I still like it, I might improve it a little and put it online for friends to play with. I've done projects that I launched but only ever used myself.
Have you ever written anything before? Good. Then take the closest thing you have from your repository, strip out the code that doesn't apply and file it under the new name. There. You're already x% done. Now finish.
I've tried many different approaches, but this one has worked best for me. It may seem counter intuitive, but I have found that things move along much faster when I enhance a minimal product than if I stew with my thoughts for too long.
[EDIT: No offense taken, but I took out the template. Now close your browser and go write your own.]
That way I still have the 'blank paper elephant' to stare at every now and then but at least not every project and I find that re-writing stuff it usually comes out much better on the next iteration.
It's like remodeling houses, every now and then it pays off to raze the thing to the ground and start over instead of adapting the house to a new occupant.
Nowadays, I'll let a project incubate in my head for a few days/weeks/months and approach the keyboard with a solid plan in mind and a well reasoned, well designed feature-set/interface.
But if you really don't have time for an incubation period, write your schema out first. This exposes so many design flaws in the beginning while it's still very easy to manipulate. This should be the "contract" you sign with your blood for the vast majority of apps you'll write for the web, and you should be spending a good deal of time thinking about it (for any non-trivial app) then, not later when you're atop a few thousands lines of uselessness.
2) check market potential using google keyword tools and get an answer to the question: Can I make money with this?
3) If 2) ist positive, then write it down and go to 4) , if not, forget about it.
4) set workflow then mockup
5) code
6) SEO
7) try to get ramen profitable
[Next] would be a marketing website. Grab a theme off themeforest.net and work on a one page slideshow explaining your idea. Do this from a marketing perspective: sell it to your customers.
I find this is crucial because it forces you to refine your idea into a marketable idea. If you are taking 3 paragraphs to explain what your app does, what problem it solves, or why people should care, well your idea is probably not that great, much less marketable. What this also does is sell yourself on the idea. Once you've taken the time to craft out some great marketing copy, you begin to think "hey this does sound like a good idea!". You also have an easy way to get initial feedback from your network.
[Finally] after using your marketing site to get inner-circle feedback, you go after some customer development. Customers tend to need to see an actual working something though so it's probably best to code out and MVP. I'd start with modeling the data and then work out the core features and at long last, I get the joy of coding!
The professional logo goes a long way toward making it feel legit.
> If you are taking 3 paragraphs to explain what your app does, what problem it solves, or why people should care, well your idea is probably not that great, much less marketable.
This may also be a function of your marketing/copy-writing ability; it doesn't necessarily correlate with idea quality or marketability. It could also indicate that your focus simply needs refinement.
Once you have a design, turn the design into html
Once you have the html, start building out the functions in the design.
I have a template that does login, tabs, and layout.
I sketch in terms of "ghetto REST"; GET /foo, GET/POST /foo/new, GET /foo/1, GET/POST /foo/1/edit, POST /foo/1/delete. I write handlers before I write markup.
I write the same %ul#foos // - @foos.each do |foo| markup for every feature I start. Ditto the edit form.
Prune down, customize, work out page flows (which is easy once I have a base of things that works properly), pick a couple hotspots that want Ajax-y behavior (not because it's hard, but because whenever I start a project Ajax-y, I'm always unhappy with how brittle the result is).
I use Compass for the Blueprint/Sass style, but I don't waste too much time making things look good; my template gets me to about 80% of "competant" and 85-90% of "usable" and then, if I care, I spend money on a designer. I find knowing that I'm going to do this is liberating; means I don't waste a whole lot of time lining up pixels.
I never touch Photoshop. I can't mock up graphically. My brain just doesn't work that way. But then, I came to web dev from 10+ years of Unix commandline dev.
Same here, and I'm beginning to think that that is slowly becoming a handicap rather than an advantage.
If I was 22 years old and trying to impress YC with a demo, or launching in front of the mass market with only my own design skills and no cash for designers, I'd be worried that my front-end skills were hurting me. But after a couple years of contact with customers and prospects: front-end is definitely not what's hurting us.
There are 3 other devs on my team, and while I've been convicted for a while of the idea that we need to hire someone crazy excellent with jQ, we're all former backend people. I think we get things done just fine.
I don't have a "methodology" so much as I have a semiconscious bias towards a process that keeps me typing and doesn't give me a lot of opportunities to stop and noodle --- at least not until I have so much traction that dropping things would be painful.
I know (especially from reading the threads here) that most front-end people have a definite preferencing for designing and wireframing up front. They're probably right. But I don't find refactoring and redesigning to be so painful that it outweighs the inertia I'm fighting when I first start a project. I need to fight past the inertia before I can profitably spend energy on design.
Also, could you explain (I think it's css/ruby/REST/psuedo code for an unordered list comprised of the foos - but how is that for a feature?):
I don't find Ajax brittle, I find my own designs when I set out from the beginning to make everything Ajaxy brittle. Brittle here meaning:
* Navigation is always funky
* I wind up with tangled messes of jQ callbacks
* I wind up with Sinatra methods that are laser-targeted for specific jQ interactions instead of general things I can use in multiple ways
Generally, the app just doesn't work as well. I think that's because it's slightly but deceptively harder to get a site driven mostly with JS working as well as a plain-ol-webapp.
Start with the main page -- whatever you (or your users, if you plan to have them) will be looking at most often. Put text on the page, even if it's static Lorem Ipsum. Or, as Tom said, the handlers for GET /foo and POST /foo. IMO, it is much easier to live with ugly pages at first than to start out with a rigid idea of a design and then struggle to cram stuff into that. Getting the CSS just so seems to take so much more time than anything else -- I prefer to save that for last.
After your main page, start asking yourself questions about how your app is going to be used. Does it need admin pages? Will it need a login page? What kind of data does each page have and how will it be displayed (eg, a directory tree with collapsible subitems)? Write all of this down. Really.
By the time you're done with this, you'll have some idea of how many pages/views you'll want, and some mental idea they should look like. Do a web search for designer portfolios -- this is a good way to find ideas for UI elements in similar apps. Use Sass + Blueprint to put the text in columns and boxes. If you use Firefox, I highly recommend Firebug (Safari has Web Inspector, but it never works quite the way I expect it to). Print out these pages and mark it up using your favorite color of crayon. Designate where stuff like images, forms and tabs will go. Take a look at CSSEdit, too.
1. Define DB schema
2. Define URLs. I find this is the best way to figure out what bits I actually need to write
3. Solve any difficult/tricky bits first, even if just as a proof of concept
4. Implement the rest
Figuring out how to do something is always more exciting to me than actually coding it, although normally the two can't be separated. Sometimes I need to implement a minimal framework first in order to have a setting to solve the problem.
I find that by getting something simple working helps me keep motivation whilst going forward, even if the code is crappy. Conversely, I've started a non-trivial number of webapps by designing a DB schema and an application architecture, each of which left me burnt out before anything of value was even written.