That's not code.Originally Posted by Anonymous
| SitePoint Sponsor |
That's not code.Originally Posted by Anonymous
Mattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com
2 points:
1) .NET is quite happy doing CSS as well
2) The auto-generated HTML works in other browsers as well, as it downgrades. Just that hte more advanced features don't necessarily work (but they still do through server-side code.
What about security? This is my biggest road block with management for jumping on the .net bandwagon.
What platform are you coming from? Internal security in .NET is fantastic. We've published several white-papers and released several security apps for .NET.





I thought this thread was buried ? There is no real contest of course as we all know which language is better![]()
I beg to differ on that... The CSS is fine but the server side code required for things (ie):Originally Posted by Jeremy W.
Is:Code:<asp:form
1) non-XHTML standards compliant
2) confusing
3) unnecessary (what I mean by this is that Microsoft could have easily written it to be standards compliant and easy to use, but they didn't)
ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC
What's confusing about <asp:form>? What is unnecessary about it?
The fact that it isn't normal HTML. This is the same problem that I had with Cold Fusion (even though, I admit, it is a cool language).
Unnecessary in the fact that Microsoft could have easily made the technology understand regular HTML tags. Why did they reinvent the wheel here? I like .NET but the code is bloated when it comes to writing something like a guestbook, which takes 30-40 lines of PHP takes up to 100 lines of code in .NET. Of those 100 lines, 20-30 could be done away with if there was some real thought put into making .NET better from Microsoft.
And lastly, standard compliance!!![]()
ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC
Actually, the ASP.NET tag/server control syntax is similar to the JSP custom tag set, and conforms fairly well to XML namespacing rules. That I can't fault it for.
I'm sorry, you think .NET is bloated, but like CFML?
Hello?
Show me the PHP application which would take 3 times the number of lines in PHP. I'll show you the opposite.
Also, I have no idea what any of this has to do with security...
J
First of all, your code above is a bit incorrect - there is no such thing as <asp:form - you just use ...Originally Posted by Hartmann
... but I see your point.Code:<form runat="server">
It's not XHTML-compliant because it isn't HTML or XHTML - it's XML. From an XML standpoint, they make perfect sense and validates perfectly. I found them confusing in the beginning too, but once you've understood the logic, it's very clear. The "asp" part before the ":" is the namespace and the part after the ":" is the control class name.
For instance, the ASP.NET Editize API is used like this:
Code:<SitePoint:Editize runat="server" />
Mattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com
Mattias makes a good point. The <asp: bits never make it to the browser, so don't even need to be compliant to anything. At all.
No but the end result (sometimes something that you have no control over) does not come out as standard's compliant code. Fairly aggrevating.Originally Posted by Jeremy W.
ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC
True, and it's one of the main downfalls of .NET right now, and my biggest pet peeve about it. But, once 1.2 is out all of your code will be compliant.
Also, I have no idea what that has to do with CSS in .NET (the post you were quoting which was over a month old) or with security (today's "dig it up" post).
J
You actually can use standard XHTML tags just fine and manipulate them in ASP.NET. You just add runat="server", like this:Originally Posted by Hartmann
Then, in the codebehind, you can do like this:Code:<select id="myGuitars" runat="server" />
Presto! The reason ASP.NET has custom controls like <asp:TextBox /> and stuff is that they offer additional functionality.Code:myGuitars.Items.Add("Fender"); myGuitars.Items.Add("Paul Reed Smith"); myGuitars.Items.Add("Hamer");
I'm sorry, but this nothing but total crap. I challenge you to a duel. Show me those 30-40 lines of PHP, and I bet I can do away with much less than 100.I like .NET but the code is bloated when it comes to writing something like a guestbook, which takes 30-40 lines of PHP takes up to 100 lines of code in .NET. Of those 100 lines, 20-30 could be done away with if there was some real thought put into making .NET better from Microsoft.
Mattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com
I have no problem with CSS at all, just using your post as a starting point for my little tangent.Originally Posted by Jeremy W.
1.2 is supposedly going to fix the compliance issue, then again, so was 2003![]()
ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC
No, 2k3 was never supposed to. I was reading every pre-release docco and it was never promised.
I'm still not sure what your tangent is. Mattias proposed one solution, but because of the mulitple layers in .NET there are literally dozens of ways to skin the cat, so to speak.
I mean, is your point that .NET code is bloated (what does bloated mean, btw?)? Is it that it doesn't produce standards-compliant code? Is it that it's difficult to use?
I'm just a bit lost is all...
J





The fact that it isn't normal. PeriodThe fact that it isn't normal HTML.![]()
![]()
I can see where Hartmann is coming from with the bloated comment. That's something in all OOP languages though, not just .NET. Java suffers from the same thing. Tasks that are pretty trivial in PHP or even classic ASP can sometimes take up more code in .NET or JSP. However, you have to use the right tool for the job. If I was making a single page that spit out database records in a table I'd probably go with classic ASP or PHP. However, if I needed a huge application, the abstraction features of OOP are well worth it and can actually end up saving you time and code in the grand scheme of things.
Off Topic:
Besides, this debate is really tired. Can we talk about something else?![]()
On the Web PHP and Appache of course. I didn't know there were other choices
Internally we are a Microsoft shop. I am trying to merge the two!! or make the case why internal development should be different from external.
If MS didn't have the bad reputation around security I would probably recommend .Net all the way around.
I understand that a lot of security in MS is knowing what doors to close (and what patches to install and when) but when speaking my manager MS is taboo when it comes to the whole security question especially with the 'mono culture' argument http://calnet.sdsu.edu/cyberinsecurity.pdf
Ok, I'll start from the beginning...Originally Posted by Jeremy W.
1. We were told by Microsoft that the release of 2k3 was going to have the ability to produce standard's compliant XHTML. This may not be in the documents you were looking at because we don't get regular old VS.NET here.
2. Recently I have been working on a project here at work that is a total of 6,000 lines of backend code (code behinds). Now, I worked on a replica of the project at home but using PHP/MySQL and the exact same thing took me 2,325 lines (+400 lines of SQL) and it is a finished working version. The .NET version isn't even finished yet!!! Now I am sure I can go in and optimize the .NET a little but I doubt it will lower the amount of code. To me, that is bloated. I haven't done any speed tests on the software but I would put money on the PHP version being faster. This example is what I am using to push the use of PHP/MySQL/PostgreSQL over .NET for some of the web related stuff.
I have realized that it is not an issue of which is a better technology, it is an issue of overkill and when does the work that you are doing with .NET become outweighed by the advantage that it is presenting.
ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC
We got pre-releases as well. We were part of the standard testing crew and were one of the key elements in developing secure web services (which, for those who remember, MS originally said would be impossible).
I'm sure we didn't get as much internal info as some people, but MS never promised standards compliance in 1.1 publicly or to us.
See, the thing is that what you are saying I've seen the opposite of 1000 times. Harry and I even had it out several times. Without knowing your app, the number of middle tiers, etc, though, it's difficult to explain the number of lines.
Was it .NET? Was it the coding style being employed? I've no idea
But, I've seen the opposite happen in Web and Windows-based apps.
Perhaps the "code bloat" is more event-driven programming and OOP than .NET? Did you do OOP and event-driven programming in the PHP model as well?
Did you use the same number of middle-tiers?
Sorry, but it isn't enough, for me, for someone to say "this used less lines" because they could easily be comparing apples and ferraris.
I'll need more info.
At the same time, though, there are instances where event-driven OOP code will use more lines. It's called cost-benefit analysis and choosing the right tool for the job.
It's not like I use .NET for every site. In fact, I rarely use .NET for webstuff. ASP, PHP and CFML are the staples of what I use on a day-to-day basis.
J
Just out of curiosity, you don't hand-code ASP.NET pages, do you?
... If you don't, and assuming you're using your company's core library, I can't imagine that more than 1-2K of those 6K lines was written by hand. If that.
I used part of our core library (mostly our MSSQL stuff) but this was an application that was needed out of the blue. I couldn't find something similar so most of it was coded by hand. (C#)Originally Posted by Jeremy W.
However, Jeremy, I get what you mean when you say you can't really compare the two. The whole non-OOP/OOP argument is a very valid one.
I understand cost-benefit analysis as well and that has been a point I have been trying to push to people for a long time. When technology A gets the job done faster, cheaper, more reliably, then you use it and not technology B, and vice-versa.
I am still behind .NET for Windows applications (over MFC anyday) but it hasn't proven itself (to me) for internet apps just yet.
ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC
On the Web, PHP, MySQL and Appache of course. I didn't know there were other choicesOriginally Posted by Jeremy W.
Internally we are a Microsoft shop. I am trying to merge the two!! or make the case why internal development should be different from external.
If MS didn't have the bad reputation around security I would probably recommend .Net all the way around.
I understand that a lot of security in MS is knowing what doors to close (and what patches to install and when) but when speaking to my manager MS is taboo when it comes to the whole security question especially with the 'monoculture' argument http://calnet.sdsu.edu/cyberinsecurity.pdf
Bookmarks