Live data from Hacker News

Web Applications Should Be Compiled

ediblepet.net

91–100 of 177 posts

Re: Web Applications Should Be Compiled

#91
I notice comments on the blog post are currently closed. I wonder why. ;)

Although I understand the author's position, it is obvious this is a tech person and not a well-rounded business person. The thing about programming is it's not all about tech.

A program typically serves one purpose: to make a company money. This requires more than just pristine tech. First and foremost it requires time to market so that a company can stay competitive. It also requires the ability for more than just a handful of people to be able to write it for expandability and, God forbid, staff changes.

C is fast. But slow to market. And slow to pick up a program. And slow to test. That's why there is so much WYSIWYG.

Don't get me wrong: there needs to be a lot more code behind and a lot less script out there, but in the end coding is a balance. Anytime anyone says it's all this or all that, you know the position is not sound. It's part speed, part usability, part scalability, part development speed, part readability, part expandability, part pretty pictures, etc. Balance in all things.

Re: Web Applications Should Be Compiled

#92

I don't see how it's possible to make a good framework in C. It lacks the necessary abstractions. It lacks even basic vital things like namespaces. Why on earth would someone attempt this in C rather than C++? You could come pretty close to simply rewriting a scripting framework in C++. I don't know what you can get done in C. It will be so dependent on programmer conventions it will be hideous. People actually have…

Actually what I would most miss in C is really basic stuff like dynamic strings, dynamic arrays and hashes.

Re: Web Applications Should Be Compiled

#93

Aside from the fact it's an obvious troll... I had that basic idea when web app frameworks starting becoming popular. So I implemented a web framework which took a 'description' of the app written in perl, and generated C++ which compiled into a single exe file which served the app with a built in http server. Small bits of business logic were written in C++, but basically it was done by the perl. All templates, inte…

I like Perl ... using modern Perl practices and CPAN modules. It's the best web development environment I worked with ... and I've worked on projects with PHP (my own framework :) + Symfony), Python/Django/web.py, ASP.NET, Java/Struts and Ruby/Rails. You should give it another try sometimes. Take a look at Catalyst (the web framework), DBIx::Class, Moose and POE.

I think I just got a bit fed up of the crufty syntax for object-orientated code.

Everything computer-related sucks, you just have to choose something which sucks the least where it matters for your project. And familiarity counts for a lot too.

Re: Web Applications Should Be Compiled

#94
post #2

Not a bad troll. Not the best I've ever read, but not bad, either.

Your comment adds less to an intelligent discussion than does the article you're calling a troll.

First, this isn't a troll. The guy posted a blog post on his own blog. He didn't post off-topic content to a thread and didn't try to provoke an argument in an otherwise civil conversation. The only possible way that you can characterize this as a troll is that he uses some crude language, and says some things that are unpopular on HN. But say what you will about the content, he didn't try to make you read it.

Second, the guy has a point. I've had a rant like this building in my craw for a long time, and this guy nailed nearly every point I've wanted to make. From a software engineering perspective, web development is in the dark ages. What's worse, it's a luddite process -- a totally self-made exile from the benefits of 50 years of progress: Type safety is shunned. Language efficiency is ignored. Data structures beyond the hash table are exotic and rare (and worse, I've met more than one "professional" web developer who couldn't tell me the difference between open and closed hashing!)

I understand very well that programmer time is more valuable than computer hardware, and that the speed/development time trade-off is often biased toward development time. But if you ask me, what was once an intelligent guideline is now becoming a cult. It is possible to do rapid development in a compiled language, and there are some really good reasons -- beyond execution speed -- to revisit the idea.

Re: Web Applications Should Be Compiled

#95

No. You really don't want to do this. Really. I have worked with a project for the past several years that, by necessity not choice, required a web application framework written in C (it's an embedded platform) and I can tell you it is pure hell. The most mundane and simple tasks, often trivial one-liners in scripting languages, require many lines of error-prone C code even with a fairly rich set of libraries availab…

You're attacking the weaknesses of C, not the weaknesses of compiled languages for web platforms.

Re: Web Applications Should Be Compiled

#96
post #29

The reason why people choose to go with languages like Ruby is because the trade-off on speed is worth it. Web front-ends scale very easily. You can just add more web heads and load balance between them. Databases are much harder to scale since you need to keep data consistency and can't just throw more boxes at the problem. So, you don't need to be computationally efficient. However, you do need to develop fast. You…

I think your point is exacerbated by the fact that it's hard to get web UIs "right". I was critical of languages like python and ruby until I had to do the frontend for some company code. Box looks like it needs to be shifted a few pixels right? Modify code, compile, check. Logo looks better with an offset? Modify code, compile, check. Writing in a scripting language makes it just Modify, check.

You just can't do that in compiled languages, and the compiled language of choice for the web-- Java --isn't known for blazing compilation speed. You'd probably also have to jar it up and copy the damn thing over, whereas psps could be modified in-place. I think this is something that compiled folks like me simply failed to grasp: all the things about scripting languages that make them orders of magnitude faster for developing, especially for the web.

Re: Web Applications Should Be Compiled

#97
post #3

> So this is why I’m writing a web framework in C. Why C, why not assembly? In fact, you know what real programmers use? -- http://xkcd.com/378/ > Grow the fuck up... > finding Rails developers is fucking impossible... You grow up > ediblepet.net is proudly powered by WordPress When will you release your compiled blog platform?

Maybe he has saved time for the real work with wordpress.

Re: Web Applications Should Be Compiled

#98

Sweet merciful lord. Is this guy channelling Zed Shaw or what? Apart from all the hand-waving and generalizations, this guy doesn't sound like he's ever really a webapp under serious load. I'm not a Ruby guy, so I don't know how things fly with that, but I've never once had a problem with a webapp being slow because of the language it was written in. Bad database queries, unnecessary assets being loaded, definitely.…

I've worked on a webapp under serious load, and I think he's right.

You're correct that database queries and resource bottlenecks are the usual problems for web application scaling, but even taking that into account, I've had more than one problem that was caused by the simple fact that Ruby is a dog of a language. Python is better, but only just so. Perl is faster than both, but still nowhere near as fast as a C++ program.

But let's ignore execution speed, since one can make a reasonable argument that even the slowest scripting language can saturate the network I/O on modern hardware. I think I'd still consider using a compiled language, because the type-safety and compile-time guarantees of a statically typed language would go a long way toward eliminating a huge class of silly bugs that we deal with on a daily basis. That's developer time in the bank.

Re: Web Applications Should Be Compiled

#99
post #2

Not a bad troll. Not the best I've ever read, but not bad, either.

At least he's planning on putting his money where his mouth is. If he creates this framework, more power to him!

The VisualWorks Smalltalk Server Pages framework already does this.

SSP results in web pages as compiled machine language.

The HTML file is translated into a new Smalltalk method, the tags become Smalltalk message sends, and the HTML between the dynamic tags just become accesses into an Array. Because Array access is optimized and JITed as machine code, the only message sends are due to the dynamic tags. When the webpage/method is JITed, you have a web page compiled into machine code.

Re: Web Applications Should Be Compiled

#100
post #65

Earlier quoted context omitted.

The vast majority of web applications are straight-up CRUD. Not making that all about a normalized schema is the stupid mistake. As far as relational DBs being the problem, that's more a matter of the free ones not cutting the mustard. Oracle and DB2 can handle jaw dropping load in the hands of an expert.

Is DB2 not free? I thought they had a free version? http://www-01.ibm.com/software/data/db2/express/about.html

It's a bit crippled.
Post reply on HN