- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
hahaha, Yeah, well, if you don't write the back-end code, don't use select *. :P
But have to agree, there are many circumstances where the cost of looking up by name is chump change, why not do it that way? Or look it up by name and utilize ordinal position thereafter if you really need to eek out the additional performance.
Admin
Another (worse) WTF is that there is a customerid in the products table...
Admin
The fact is that most people do use it wrong: they make some PHP script with HTML hard encoded in it and a few PHP loops inside (and even SQL queries shudder) and call themselfs programmers. A well build framework in PHP like the one I helped develop has as much to do with those scripts as a elephant has to do with the moon.
As for scaleability, we just deployed a major travel site over a cluster of 9 servers (db, web, other) with no trouble at all, completely in PHP. And portable? We develop on half a dozen different platforms since we're free to choose and maintain our own development environment and it all works exactly the same on windows 2003, XP, Vista and linux. Try that with a .NET application.
Ontopic: sad but true these things happen; though for us luckily very seldom. We used to have collegue that worked on the same principle and his code is a true nightmare to maintain - usually when I fix bugs in his code the end result uses half as much code as the original. There's functions with some obscure argument list that only return true or false (generally 2 and 1 respectively in his code, I kid you not) which he probably was going to use but forgot about. A very nice guy all around, but I'm still mightily relieved he left the company.
Admin
Admin
PHP is good for rapid prototyping and utility scripts (and web development, but I don't do much of that anymore). In that respect it's like Perl, but much less intimidating. It was originally intended as a web template environment, but it works quite well as a shell scripting language.
Admin
There are quite a few solutions for .NET. You can serialize sessions use SQL Server and run SQL Server in a any number of different high availability configuration. There are a number of distributed cache (I'll try to keep the technical terms to a minimum - you can google this one to find out what it is) products available to replicate session state, including Gigaspaces, which is free for use for companies with revenue below $2 million. There's an open source distributed cache called Indexus that can also be used for session replication. Of course, you could just write your own, but then that would require you to actually know how to program.
Admin
It's been years since I've used CF, but I seem to remember running several very large sites using CF4.5 non-Enterprisey edition in the late 90s, and being able to serialize client state via a database, much as you describe for .NET. It worked very well with high loads (quite surprising if one ever looked at how it worked), and was completely out-of-the-box functionality.
The awful ClusterCATS (or was it ClusterF*CK) software that Allaire/MM acquired and incorporated in the Enterprise Edition was indeed a huge WTF though. I remember spending several despair-filled weeks of my life trying to get it to work before realizing that HLBs we already had were indeed a much better solution.
Admin
How did you replicate the session state between the 8 servers?
Admin
CF7 has been out for 3 years now and CF8 for a year. I haven't had a problem with CF6 session replication either.
Although you do need CF enterprise for session replication to be supported, it's only $7500 per server (2 sockets), so with 2 servers it's only $15000 and that gets you as many instances as you want on those 2 servers. That's barely more then what MS charges for a single socket of SQL standard, forget about SQL enterprise which is $25k per socket.
.NET is not free either. In addition to Visual Studio licenses for every developer, you have to pay for windows - $2k plus external connector - another $2k per server - that's $4k per server. If you have SQL server, that's another $4k for windows and $6k per socket of SQL Standard.
That's only if you host your own website. The moment you start hosting sites for other people, your license becomes invalid and now you need to buy more license - the monthly kind. It will run you about $200 per month for a windows license and another $200 per month for a SQL license.
While I agree that .NET is not a total clusterfuck when it comes to HA, the cost of a .NET deployment doesn't justify using it. When you add everything together, CF is the cheaper solution, and oh - it's cross platform.
Don't forget that there's a free open source version of BlueDragon now, and although I don't really know what the features of this server are, it's probably better then PHP.
Admin
Easy: one master MySQL server that replicated to 2 others combined with PHP's little documented feature to create your own session handler.
At the end of a script each session is written to the database, replicated to the others and on the next pageview loaded from whichever databaseserver had the lowest load. The whole custom session handler, including comments etc, is under a 100 lines of code and is really little more than a few functions to read and write a textstring to a certain location.
As for speed: we've also implemented three memcache daemons to speed up other parts of the site but while profiling we noticed that those few string writes/reads for the session handler barely took up a fraction of the total parsetime so we let them be.
Admin
I wonder how many people think they're using XML... in any capacity.
Admin
That's an interesting non sequitur. I use xml when I had to deal with web services. No other real reason to use it IMHO.
Admin
Sorry, had to address a couple of misconceptions here:
Admin
He's not your guy, dude!
Admin
Admin
Ahem... the real WTF is having customer_id in the "products" view (or, worse, table).
Admin
Barf 4eva, you're right ... but not totally. A well structured app would have the DBMS access in a package, so in theory the query need only be coded once.
Further, though, table structure is irrelevant -- if your DBA knows her trade. No competent DBA exposes base tables to programmers -- certainly not to those who only know VB*, PHP, JSP and/or CF. (I realise that many people who are paid as DBAs do allow access to base tables, these days.That's one of the reasons that web apps have such a short half-life.) Once a view is released to Development, its structure is fixed, as far as the DBA is concerned. So the "table structure" shouldn't change. (Again, people paid to act as DBAs have been known to deviate from this standand.)
Also, the number of columns is a minor issue, assuming that the "products" view (or table) does in fact contain information about products, as well as customers. With a large customer, you might get back 500,000 rows from this query. Want your best customer going "WTF" ..? The problem is rows, not (so much) columns.
Matthew: normalisation won't solve this for you. Generally, greater normalisation worsens the problem. (Yes, that's an "s" in "normalisation" - I'm not American.)
Admin
I too am happily running a clustered web server environment using .NET SQL sessions.
No issues migrating between servers.
Negligible impact on speed of page loading by the time the request has gone through all the various firewalls/encryptions/etc.
Admin
You're not my Guy, Friend.
Admin
Yes, about $10k ($2k for windows, $2k for external connector)*2 plus $6k for SQL server socket. So about $12k for licensing for 2 servers if you go with a 1 socket license.
The second, however, you decided to host sites for your clients, this licensing model no longer works and you need to go with the $200/month/cpu model.
So $200 per cpu for windows, lets say it's a two cpu box, will run you $800/month for 2 servers. Another $200 for a single socket of SQL standard and you're running $1000 a month.
If you want to do clustering, you'll also need a SAN or some other sort of shared storage. That's will probably run you another $500 a month. So that's $1500 a month just to support the very basic cost of clustering.
Add to that the licenses for all the other servers in your domain that might be indirectly accessed by your web app, and you need to license those under the $200/month/cpu model.
Admin
European Community website is using CF.
Admin
Russ, your entire argument centers around the fact that MS SQL Server is expensive. We're talking about the .Net environment, not what database server you're using. And no, just because you're using .Net doesn't mean you are using MS SQL Server. Plenty of people use Oracle and Postgre as well, which you can even host on Linux. And yes, I have worked on .Net applications that used these as backends.
First you were trying to say that only CF and Java can handle a HA environment. Numerous posters demonstrated what an utterly idiotic statement that is. Your response to that is that .Net isn't "completely horrible at HA," even though you haven't demonstrated that .Net is horrible at HA. At all.
Now you're trying to make it about price. First, you're not comparing like to like. Then you're adding in a whole bunch of crap that a shop may not even need in the first place.
Even then, price is an incredibly weak argument. Even in an all-Microsoft shop, the cost of the software is maybe 1 or 2 percent of the amount of revenue the software brings in. And then you have to factor in productivity due to a certain environment (developer time requirements trump software price easily for any sizable environment). Which brings me to my last point.
You have not made any sort of case that CF is a good development environment. You're making half-assed uninformed claims about other technologies (wasn't your pet peeve about people making half-assed claims about CF? Hypocrite). But that doesn't constitute proof that CF is any good. About the closest you got there was that CF is portable, to which most developers I know would respond "BFD, portability is overrated." Which it is.
Again, the strength of a technology has little to do with its price. Brainfuck is free, and yet you don't see many people clamoring to develop in it. What matters is how easy to create scalable, robust applications in it. And you have not, in the slightest, demonstrated that .Net (or PHP) is bad at it, while CF is excellent at it.
Were you the same poster that defended CF the last time on here? Because if I remember correctly, that argument left me more negative on CF than anything else.
Admin
First off, thanks for the response, and it made perfect sense. I haven't had the opportunity to work in a large-scale IT environment yet, so I haven't had the level of separation you describe regarding only having views available to development, but understand the point you are making.
Although the point I was thinking of regarding large numbers of rows being returned were cases where set-based logic did not yield itself best to a complete answer over a large number of rows. There might be a time when either a) you want to have the functional/procedural work on an app server or b) you want to have the functional/procedural work on the db server itself. I'm almost always a fan of NEVER returning ridiculously large result sets, yet have found a few cases where set-based logic did not lend itself well to an outcome (sort of like running totals in sql server... I'm thinking it would be nice to have this type of analytical function though, just like Oracle's lag() function)
In Sql Server 2000 and greater, if you grab a row and in the select clause have included more columns than what is in the index (and, if we are talking sql server 2005, is not an "included" column in an index), an additional expense is incurred to read the full row by clustered index. Over a large number of rows, this double penalty of seeking/scanning to rows via index, and then doing a lookup of the rest of the row data from the data page via clustered index, can hurt performance. granted, in most cases, you shouldn't be returning a ton of rows, but even for complex queries that do a lot of work internally before returning the result set, if the value from the select clause is used from a derived table and is not a part of an index, you could potentially be incurring this penalty here as well.
Not sure what behavior you get in other DBs...?
Admin
Right, so now you've got the overhead of a hash table if you're lucky, or walking an array if you're unlucky, plus the overhead of the metadata being read to find the column names. No wonder people complain about slow code in naively written webapps with fuckwittery like that going on.
Admin
Looks like "Lindsay L." is working with the Love Bug. Or at least the Query bug.
Admin
My argument was not even anywhere near the fact that MS SQL is expensive. I'm not even sure what argument you're talking about. Someone said that CF enterprise is expensive, and I'm trying to show that .NET comes with a lot of hidden costs - ie, it's not free. There the Windows License (unless you run it on linux, but that's unlikely), the IDE license (unless you use a third party editor, again unlikely), and the SQL Server license. Sure you can use a third party server for SQL, but the majority will be using SQL Server.
In my defense, I believe I said "As far as I know". I stand corrected.
If you're developing in .NET, you're likely going to need Windows, Visual Studio and SQL Server. Not necessarily, but very likely.I don't remember who defended CF the last time around, or why CF even needs defending. CF is one of the best tools for RAD. It runs on top of Java, which virtually eliminates buffer overflows. There are numerous free frameworks that you can use for larger applications. It's as powerful, if not more so, as .NET/RoR/PHP and it takes less time/code to do things in CF.
The only argument remains price, and as I hope I've demonstrated, .NET can come with a lot of hidden costs.
Since it takes less time to do things in CF, and produce the same quality output, CF is better. Q.E.D.
Admin
And my point is that you have not proven either of these claims in the slightest. You are begging the question.
The only thing you have shown is, that if you choose SQL Server as your backend (which is not nearly as necessary as you seem to think) then its expensive.
The last time we (being The Daily WTF) had this discussion, I started out neutral and, after numerous attempts by certain posters to demonstrate CF's superiority, left me questioning its maintainability and scalability.
However, being as I've never used CF, I'm not in any position to claim that .Net is altogether better at development time or quality. Being that you have demonstrated, several times, that you are not familiar with .Net, you are not in that position either, no matter how hard and loud you claim that you are.
If you wish to make the claim that CF is "one of the best tools for RAD" and that CF is better [than .Net], then you must support that with coherent arguments and evidence. You have neither, and therefor you fail.
Admin
You are correct, I don't have much experience with .NET and you don't have much experience with CF. We can agree that the best environment is the one that you're most familiar with.
I started a coder challege, not so much to prove that CF is superior, but to see how things are done in other languages.
http://forums.thedailywtf.com/forums/t/8373.aspx So far, the only .NET solution is not very elegant, and in another thread I was accused of making it CF biased, because "CF has built in DB support.". That's kind of one of the points, but I challenge you to post your solution and start another thread with a more "unbiased" example, so that we can see the implementation in different languages and decide for ourselves.
Admin
Oh, have you seen this?
Admin
omfg
Admin
[quote user="Xarium"][quote user="Russ"][quote user="Xarium"]I wonder how many people think they're using XML... in any capacity.[/quote] That's an interesting non sequitur.[/quote] Or perhaps you have become so involved in your little favourite-language argument you've forgotten the original premise of this thread? Not all posts are in reply to you. Incredible I know, but there it is. [/quote] The original premise of this thread had to do with stored procedures. I don't remember ANYTHING about xml the entire thread. Perhaps I misunderstood you original post, or perhaps some of the words I used were too big for you? Seriously, what's your problem?
[quote user="Xarium"] [quote user="Russ"]I use xml when I had to deal with web services. No other real reason to use it IMHO. [/quote] I'd recommend you don't use XML either. Please.
Oh, have you seen this? [/quote] [/quote]
Thank you for the article. This explains people like MasterPlanSoftware and KenW among others on this board. The question is, does it describe you?
All I said was that IMHO, XML is only useful for things like web services - i.e. when you need to share data between different systems. It might be also useful for sharing data between enterprise systems. XHTML is technically XML, but I don't think that really counts. Can anyone suggest any other valid uses? I think XML gets way overused by people who fit that article.
Admin
I don't think its a valid test, but not because CF has built in DB support.
First the issue of elegance. Elegance is, by nature, a subjective criteria. Testability and maintainability are less subjective, and more important, criteria. I can't count the number of times a developer wrote an "elegant" solution that was unmaintainable.
Second, a narrow test doesn't properly represent how a platform performs in a variety of areas.
When I'm selecting a language and platform, I am thinking about using it to build a robust, maintainable application. I suppose if your application is a single list page it would make a good test, but most of my applications are significantly more complex.
That snippet shows that if you put your controller and view logic together, you can make a simple list page fairly easily in CF. I could write something similar in .Net, but I wouldn't. I'd write something with a controller so that I could unit test it.
Now since I don't know CF, I'm going to raise a hypothetical. If I were to design a test that covered a single area that .Net was strong in, but CF was weak in, would that be fair? Of course not! Thats because a real application is a complex thing, and doesn't cover narrow areas in the language.
By the same token, its not valid to judge CF based on, say, the WTF's on this site, right?
So what it comes down to is, unless you know both tools and can give solid, objective, technically sound reasons why one is better than the other, any claims of superiority are strictly a matter of opinion.
Admin
I think I've been guilty of the same thing as the people that think CF sucks - I judge .NET by a bad developing experience I had with classic ASP. Just as CF5 is not the same as CF8, classic ASP is not the same as .NET.
I would like to explore .NET a bit, just to see why people defend it with such vigor.
What resources (books/websites/etc) and tools would you recommend for learning/developing .NET websites? Are there any frameworks that one should be using with .NET?
Admin
Unfortunately, I can't think of any examples off the top of my head. I figuratively jumped right into it, starting with modifying code and then, using MSDN, Google, and peers as a resource, learned more as I went on. MSDN is not necessarily a good resource for someone starting out from scratch. Some other posters might be able to help you out.
As far as frameworks built on .Net go, there are some out there, but I wouldn't think you'd need to know about them starting out. About the only thing we're trying to use at our work beyond the .Net free stuff are Enterprise Library (which we use for a more configurable logging layer, and more database agnostic abstraction layer for the data access layer), and the Web Client Software Factory (a somewhat over-complex pattern that aims to allow you to unit-test your UI presentation logic). I wouldn't say you'd need to know either.
The ASP thing is an extremely common misconception, mainly because Microsoft named their new web front-end technology ASP.Net as sort of a marketing thing. I guess they thought ASP had a good reputation which, as both you and I know, is not the case. Yes ASP is a big WTF. I've had to deal with sites written in it, and I hope that I never have to again.
You can do classic ASP coding in ASP.Net, but we usually drag those developers out back and put them out of their misery.
Looking a bit more closely as Cold Fusion, it seems that it can interop with a variety of other languages, including .Net. It seems to have a very simple syntax for doing database tasks. The samples that I am viewing seem to suggest that its more geared towards coding rich web front-ends. Do you also use it to code back-end services or web services?
Addendum (2008-04-22 13:41): I have to say though, that I don't see (from my cursory research), why The Daily WTF posters seem to think CF is a WTF. The only really kinda ugly thing seemed to be manipulation of XML via the XMLDOM, which I've found to be pretty ugly in any language (and could really just be a stupid coder).
What I would consider a language WTF are things like PHP's mysql_no_we_really_mean_it_this_time_escape_string and magic quotes, etc. Of course thats more about PHP worrying about breaking backwards compatibility and thus stagnating adoption.
Admin
In PostgreSQL, "Identifier and key word names are case insensitive." Postgres automatically folds all unquoted identifiers to uppercase, just like Oracle, and MySQL (from memory) folds them to lowercase. If you want case sensitivity, in any db engine I know of, you need to quote your identifiers. If you do quote them, then all the engines treat them as case sensitive.
HTH. HAND. Cheers.
Admin
Alternatively, you could just go out and get a job in a dot-NET environment. That's what us contractors do.
Typically, you'll find that the job is totally screwed up, and they lied to you at the interview, and that your "Senior Web Architect" is, in fact, a worthless, incompetent, callow youth.
This is the point where you google for the relevant O'Reilly or Addison-Webley book.
You might still be wasting your money. However, at least you know what you're wasting your money on.
Admin
Need a mention there's a free and open source impl. of the language called OpenBD ?