Edited for brevity:

What software engineering tools/practices and design/architectural patterns are used in web application development? What tools and practices would large companies or large web development teams follow? What kind of design considerations need to be made when working with JavaScript?

e.g.,

  • Would Google, Facebook, or Yahoo use UML in their design process?
  • Do web developers care about cyclomatic complexity?
  • How would a global web development team diagram and document a complex design?
  • Do most web development teams use Agile?
  • Are there any architectural/design patterns specific to web development or JavaScript development?
share|improve this question
3  
How is Javascript not "traditional"? It's just code. Why are you treating like it's not code? What is different between Javascript and C#? Programming is programming, right? What do you think could possibly be different? – S.Lott Apr 5 '11 at 15:41
1  
@JR.: "different paradigm of the web"? What does that mean? Code is code. Web, desktop, phone, whatever. Can you clarify what you think is "fundamentally different"? Perhaps explain why your list of examples would be somehow different. – S.Lott Apr 5 '11 at 16:42
@S.Lott: "What patterns and practices do web developers use?" is what I'm trying to ask. I'm sorry for any confusion. – zarjay Apr 5 '11 at 20:57
@JR.: I still don't get what's different about the web from other software development. I guess I've been developing web apps for too long to see "web" as a distinction. Your update mostly just repeats your question word-for-word. Please define how "web" and "javascript" are different from every other kind of software development already being done. – S.Lott Apr 5 '11 at 21:13
2  
@SLott: heh! He's trying to find out if there /is/ anything different and, if so, what it is. I'm with you: web dev is just the same as any other kind of dev, imo. You can apply whatever principles and practices have worked for you before and they should work in web dev, too. I suppose the web offers a more dynamic, more movable environment and maybe debugging is more interactive. That's about it, AFAICS. I was a trad dev guy, was very comfortable with move to web. No differences that I could see. Are you ... over-obsessing? :-) – Pete Wilson Apr 5 '11 at 21:53

closed as not a real question by Thomas Owens Mar 10 '12 at 0:36

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

4 Answers

up vote 8 down vote accepted

I work on a geographically distributed 5 man team that builds a large, complex web app.

Some thoughts on the unique aspects of rich client-side web apps:

  • The platform is fragmented and completely out of your control

    This means that you need to have a browser abstraction layer. We use Ext JS, but the others would do as well. Going your own way on this one is crazy. This is a project in and of itself.

  • The primary platform API, the DOM, is too low-level to scale

    A complex web app UI can have thousands of DOM elements. Unless you wrap those in components, like Ext does, this becomes unmanageable. The browser is a bit of a strange beast as it doesn't provide a high-level API at all. We chose Ext JS specifically because of its rich component architecture. The shift from a global view on elements to a namespaced view on components is key in moving from typical web apps to large-scale web apps.

  • Since all code must reside client-side, code size becomes a big deal.

    Concatenation/minification and on-demand loading are essential, much more so than in other platforms. Our build system automatically concatenates and minifies javascript and css. We also have an on-demand loading infrastructure with dependency tracking. Jslint is important to ensure worry-free minification. It seems odd to use Ext JS if code size matters that much, but we use almost every part of the library and it is actually quite compact for all the functionality that it contains.

  • The app is schizoid, with half of its code on the client and half on the server, and a huge chasm of delay in between.

    It's like having to go to disk for every piece of data you need. We've adopted JSON-RPC as underlying communication layer, and built centralized code for doing web service calls, in order to minimize the complexity for the web developer to do server calls. Even so, in order to minimize calls to the server a very careful web service API design is required. This is the trickiest aspect of designing the web app's architecture.

Some other thoughts on the examples you gave:

  • We don't use UML, but we do have design documents, with class diagrams, sequence flows, db table relationships, and so on.

  • We don't measure cyclomatic complexity. There doesn't seem to be a practical value for it.

  • We try to avoid having app modules communicate directly (they communicate over a core "hub"), so there's little risk on working on different modules at the same time. There are never more than two developers working on the same module.

  • Architecture-wise we rely on the following: module pattern for hiding code from the global scope, Ext's component system for encapsulating application UI segments, faux namespaces (nested objects) for avoiding namespace collisions. Oh, and obviously asynchronous API's throughout the app, so any part of the code can contain a server call without it having to occur synchronously.

share|improve this answer

I worked at Google for a year, so I'll answer from their perspective. Compared to other large organizations that I have heard about, they are very unusual. But in an obviously effective way, so don't dismiss it even though it may run counter to what you expect.

Imagine you're on a big (possibly global) team...

That seems like major mistake. Large unified teams have inherent productivity problems. With a highly dynamic language like JavaScript, those productivity problems become much more problematic. Therefore it is better to have many small teams, each working on their own problems, but with a shared code base. How small? Well a commonly stated rule is the pizza rule: If a team is building something new, then the team should be small enough that one large pizza can feed them.

Next you need basic good practices. See How do big companies of software developers check for bugs in thier programs? for some of the important ones. Those are good no matter what the language is.

Moving on, JavaScript in particular, being a dynamic language, has many possible pitfalls to avoid. You can get rid of a lot of them by combining a good coding standard, automatic linting to catch whole classes of bugs, and then a good minifier that can take your clean, well-organized code and produce something that will execute efficiently on the browser. Here is Google's style guide, a lint tool to verify that you are following it (this will automatically catch common sources of bugs like assigning to undeclared variables), and the compiler that Google uses.

As with all languages, development always proceeds in two directions. Working bottom up you create the libraries that you need to make development of your application easy. And working top down you build your application on top of that library. Google has open sourced most of the library that they develop. It takes a while to learn your way around closure, but it is heavily used inside of Google. If you're going to work on the front end at Google, you need to learn it.

Note that with consistent style, rigorous code review, and an effective approval process, people both can and do work on any part of the code that they need to. If core libraries don't do what you need, you should fix that. It's a little surprising to watch it in operation, but it really does work.

While I was at Google I was not doing web development. However the parts of the company that I saw didn't talk much about UML, cyclomatic complexity, design patterns, etc. Sure, people knew abut that stuff and would be happy to use it where appropriate. But "where appropriate" is a critical qualifier. Design documents were mostly written in plain English, and were intended to be as clear as possible.

The corporate philosophy there is very much code talks, bullshit walks. Google famously doesn't have much use for architects who aren't coding. But they are very, very good at recognizing good designs and code. If you're coming up with good designs and code, people don't care too much about the process that you use to get there.

I'm quite sure that other corporations have very different cultures.

share|improve this answer
@JR. Can you clarify how Javascript is different from all other software development? I still don't see how this would apply to Javascript specifically. It applies to all software development in all dynamic languages. Please provide some way to distinguish this answer as "good" from some other random advice on software development that would somehow be "bad". – S.Lott Apr 5 '11 at 19:21
2  
"If a team is building something new, then the team should be small enough that one large pizza can feed them." If I worked at Google, they'd save money - I'd be a one-man development team. Either that or their pizza bills would be much higher... – Ant Apr 5 '11 at 20:50
@S.Lott: I'm not saying JavaScript is different from all other software development. I'm not saying some other random advice on software development would be "bad." I'm asking what JavaScript developers use. If it's the exact same stuff, it's perfectly fine; I'm just asking what they use. >_< – zarjay Apr 5 '11 at 20:53
@JR.: Okay, so there's no useful distinction in your question. It's just "how do people do software development"? Is that the question? I don't get why you're so interested in "javascript" as a language. There are little useful distinctions to be made. Yet, something about "Javascript" is so important to you that you wrote this question (several times). What's so important about Javascript? Or Web? Or whatever it is that's supposed to make the question unique? – S.Lott Apr 5 '11 at 21:15
3  
@s-lott: There is a lot of content in my answer that I think could be useful, informative and surprising to someone with a lot of programming experience with other languages. So it is a lot more than just "how do you do software development?" Furthermore look at what @joeri-sebrechts wrote for a lot of important stuff to think about which is very JavaScript specific. – btilly Apr 5 '11 at 21:52
show 1 more comment
Would Google, Facebook, or Yahoo use UML in their design process? 

I'm sure they use something (UML or some other modeling language) for desing and modeling their most complex architectures, but not necessarily for everything (and this is true of many organizations.)

Do web developers care about cyclomatic complexity? 

Good developers (web and otherwise) care and are aware of cyclomatic complexity. Shitty ones do not.

How would a global web development team diagram and document a complex design? 

Firt rule of sufficiently complex design: There has to be someone for whom the buck stops at his/her feet. That is, someone has to have ownership of the overall architecture and make/enforce design decisions. Depending on the maturity (and reliability and track record) of remote teams, they might own a piece of the design, and thus are responsible for documenting it within the constrains and rules established by the head architect/designer.

Without someone having ownership of the design, it is just mayhem for any team (whether 100% local or globally distributed.) It all goes back to software engineering 101 (something that most people with software engineering titles suck at.)

Do most web development teams use Agile? 

No. And this is also a 'no' for most development shops, not just web related. And many who claim to do simply use the name for something else. Having said that, there are good teams that do not use agile (or just part of it.)

Agile is a good thing, but it is not a silver bullet. You can give the agile manifesto to a horde of clueless code monkeys, and that will not stop them from producing shit-code or form failing to deliver good software on time.

share|improve this answer

Would Google, Facebook, or Yahoo use UML in their design process?

Don't know about them. We do.

Do web developers care about cyclomatic complexity?

Can't answer for anyone else. We don't.

How would a global web development team diagram and document a complex design?

We don't have global web development teams.

We document internally with RST/Docutils.

Do most web development teams use Agile?

Can't answer for "most", only our team. We use Agile.

Are there any architectural/design patterns specific to web development or JavaScript development?

No.

share|improve this answer
So basically it's "Much ado about nothing." – Robert Harvey Apr 5 '11 at 21:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.