XHTML/Web Apps

Some of us love those electrons just a little too much
Post Reply
Freecare Spiritwise
Grand Pontificator
Posts: 3015
Joined: Thu Mar 13, 2003 5:35 pm

XHTML/Web Apps

Post by Freecare Spiritwise »

Stoned and bored and didn't want to hijack Mukik's networking certification thread, so branching off:

@Ddrak:

Aren't the tag names case-sensitive? I took what I was reading to mean that a tag named <BODY> for instance wouldn't be compliant because XHTML tags are supposed to be lower case. But they should be lower case anyway, just like all tags should be closed. Allowing a structured document to be unstructured and then expecting the browser to make sense of it I've always thought was ridiculous. Web browsers should reject malformed documents just like XML parsers do, and developers who publish malformed documents should be bitch-slapped. It would also cut the code needed to write a web browser by at least a third.

So maybe you found a hole in my knowledge. But I'm still under the impression that there's some subtleties of the language that not all browsers are compliant with. Shit, IE is just now finally compliant with DHTML. And since these markup languages are derived from SGML, if you know that, you pretty much have it covered. But if there's differences I should probably know them, so I'm gonna spend a day or so next week just in case anyone ever asks me about it. That gets back to the whole keeping the resume current thing. Really, I've always thought that developing web applications is like asking a programmer to write all his code in the form of Word documents. I know we've had this discussion before, but I've always said that HTTP/(D)HTML is just an ugly evolution. We need a much better, event-driven application protocol with a much better language to express not only static content, but dynamic content and (better secured) executable code.
Freecare Spiritwise
Grand Pontificator
Posts: 3015
Joined: Thu Mar 13, 2003 5:35 pm

Re: XHTML/Web Apps

Post by Freecare Spiritwise »

Web Frameworks/Web Development Rambling

The future is really where all these ugly languages, protocols, object models and event models are abstracted with technologies like WPF and implemented for the masses with something like Silverlight. I can't stand Adobe, and Microsoft is light years ahead of them anyway since they own the OS and the talent. They won't make HTTP and HTML go away but they are abstracting it to the point enough where developers can focus on writing the application and not the markup. And there's already the .NET framework to build it all on - managed code FTW.

With WPF (Windows Presentation Foundation) I can write an application that doesn't care whether it's a windows app or a web app. And at least ASP .NET de-couples the code from the presentation, so we've had that for years.

HTTP and XML are a good combo though for SOA (Service Oriented Architecture) based web development. Web services are beautiful, and WCF (? I'm still a noob) abstracts those. We use lots of third party web services on a daily bases. With 3 lines of .NET code I can have someone's credit report, driving record or other stuff like how many claims have been filed against their house all in XML format in 1-5 seconds. Under the hood those few lines of code create a SOAP document and exchanges the information with HTTP, but to me it acts like a method local to my application.

I wish I knew more about PHP as a development framework, but I'll probably live or die with Microsoft so it's a low priority for me. For small scale applications it seems pretty ok though. It's usually paired with MySQL, which is a good engine, oh, and free. I've spent most of the last 4 months on pure research just on database engines/access methods and I can say with conviction that MySQL is a great platform. It doesn't benchmark very well against SQL server though. I wrote a database abstraction layer that uses the .NET managed providers (MySQL has one too) for totally generic code. I can flip a switch in my application and it can use any database and my app won't know the difference.

AJAX

Another ugly DHMTL abstraction layer but it works. AJAX is really picking up steam, and clients love the pull-down calender controls and collapsible panels. Does PHP use AJAX, or something like that? I've spent the last 5 years replacing hundreds of thousands of lines of classic ASP spaghetti script with tight, clean, obect-oriented re-usable code and before AJAX there was no way of doing that without getting back to the ugly client side script. I was writing VB code that generated client side javascript code that called back to the server side VB code just to avoid the miles of spaghetti of the classic ASP apps I was porting to .NET.

So AJAX is finally completing the circle for me to be able to do the apps the way I want to do them and still give everyone the bells and whistles they ask for. For a while I used a 3rd party toolkit (Infragistics) but they're very expensive and if you find a serious bug in them you're screwed. All of what Microsoft is doing with AJAX (and most of the web for that matter) is open source. I'm just finishing up a large insurance claim system and the client is going from a 25 year old COBOL DOS-based system to a web application with an interactive AJAX based user interface modeled after MS Outlook.

Finally web application developement is almost where it should be. Apologies for the stoned rambling, but I love talking about this stuff and there's some hardcore card-carrying geeks here.
Ddrak
Save a Koala, deport an Australian
Posts: 17516
Joined: Thu Jan 02, 2003 3:00 pm
Location: Straya mate!
Contact:

Re: XHTML/Web Apps

Post by Ddrak »

XHTML:

Yeah, the tag names are case sensitive, but that's just common sense anyway. XHTML is pretty much what everyone should have been doing in any case - it just means that if you have the DTD at the top of the page then the browser can reject any stupid crap you do.


PHP:

It sucks. Seriously. Remember old-schools ASP? That's PHP. Embedding raw HTML output inside your script, mixing model, view and controller all over the place, having to write a whole bunch of crap just to get any sort of structure to your code. I get hives every time I go in and edit some. On the other hand, you could pick it up in about 10 minutes if you're a programmer because it's pretty much like any other language.


AJAX etc.:

I hate it. It's all a hack. Yeah, it makes things nice when you have some decent frameworks layered over the top of it but underneath it's still a messy steaming pile of crap. I think the future's going to be along the line of Silverlight and Flash competing for marketshare, with Silverlight definitely being the smoother framework to use. I still have to get my head around WPF - I can do "Hello World" apps but haven't really tried to get it to do anything decent yet. We're probably going to be using it for our next project at work though, so that's going to be interesting.

In general, I'm really positive about .NET. It's miles ahead of any other similar technology and gaining a bunch of steam. The only thing it needs now is some sort of true ESB framework - frustrating me at the moment that MSMQ really isn't something that seems to blend well natively with .NET, but I haven't looked through the WCF stuff yet. I was kinda impressed with the stuff Apache's done with ActiveMQ interfaces, but I'm still not sure about any of that side of the equation yet.

Dd
Image
Freecare Spiritwise
Grand Pontificator
Posts: 3015
Joined: Thu Mar 13, 2003 5:35 pm

Re: XHTML/Web Apps

Post by Freecare Spiritwise »

.NET 1.1 was kinda clunky but 2.0 and above is a thing of beauty. I feel better now about not knowing PHP. I could swear that some people are using it with Java but it still sounds ugly. I've been a Microsoft shop for as long as windows has been doing the internet and they've taken pretty good care of me. And the tools keep getting better. Visual Studio 2008 is a fine IDE.

And yeah, if classic ASP and PHP were still the only games in town I'd probably be in culinary school. I spent years doing clean object-oriented apps and then all the sudden with the web I had to take a big step backwards.

Have you checked out the open source AJAX control toolkit over at http://www.asp.net ? It's not created by Microsoft but it's sanctioned by them - that's what we're using now.
Freecare Spiritwise
Grand Pontificator
Posts: 3015
Joined: Thu Mar 13, 2003 5:35 pm

Re: XHTML/Web Apps

Post by Freecare Spiritwise »

WMI - Windows Management Instrumentation

Have you worked with WMI, DD? It's badass. Sometimes the problem with my apps is that they run on other people's machines- old, shitty underpowered ones. With a few lines of code my web app can tell if the machine it's running on is overheating or if the CPU utilization is too high, or how much RAM or how many cores it has.
Ddrak
Save a Koala, deport an Australian
Posts: 17516
Joined: Thu Jan 02, 2003 3:00 pm
Location: Straya mate!
Contact:

Re: XHTML/Web Apps

Post by Ddrak »

Haven't played much with WMI other than the usual poking around with it when delving into the arcane junk inside installers. Most of the stuff I'm doing is SCADA stuff from linux powered field devices to Windows servers and Windows clients. Typically thick client stuff but starting to use web services in a big way to get rid of direct connections to the database. I try to limit my exposure to UI work because it just eats up time in trivial details and tend to focus more on C++ service-level coding when I can.

I'm still in shock how much time managing people takes up. I used to be able to write lots of code in a day, now I seem to spend the whole day helping other people do their code.

Dd
Image
Freecare Spiritwise
Grand Pontificator
Posts: 3015
Joined: Thu Mar 13, 2003 5:35 pm

Re: XHTML/Web Apps

Post by Freecare Spiritwise »

Guys at our level are supposed to be more managing roles but it's not always that simple. I'm a manager in the sense that it's my design and my baby (and my ass if it doesn't work), but my job description and marching orders are to be whatever I need to be and do whatever I need to do to get the thing done. Usually that means doing the more critical code. I'm basically the guarantee that it's going to be done right and the clients are going to be thrilled with it. My management style is that if everything is running smoothly then I stay the hell out of everyone's way, and if there's an obstacle I knock it down and call for backup.

It's been years since I've done SCADA or anything truly real-time. Windows has always been a lousy real-time OS (the reason you're using some linux there?), but it works great at managing/interconnectig things that are real-time and storing the data. Sounds challenging and fun. I'm envious.

User interfaces have always been one of my specialties and something I've received a few good awards for. I have a certificate of acheievement from the CA state legislature for some UI work that looks really good on a resume, but it's something I like doing mainly because so many other people get it wrong. To most coders the user is some abstract concept, and probably someone not qualified to operate the system. The user is an obstacle. In my world, it's the users that write the checks and tell their associates how awesome we are and they write us checks and everyone is happy and writing checks. The user is the whole purpose behind the system and far too many of us forget that. The system could be a work of art but without a good UI nobody will ever know. Conversely, a crappy system with a good UI will get user accolades it doesn't deserve. So some people are the opposite- all style and no substance. Someday I'll be able to pass the UI baton but for now I'm stuck with at least designing every UI for every project. But some days it feels like being an actor type-cast into a role. More people should step up and they don't.
Freecare Spiritwise
Grand Pontificator
Posts: 3015
Joined: Thu Mar 13, 2003 5:35 pm

Re: XHTML/Web Apps

Post by Freecare Spiritwise »

C++

It was my bread and butter for over 10 years. At one time I probably knew as much about the language as stroustrup himself. I spent a couple years on USENET arguing with the Visual Studio development team over C#. But I've long since said goodbye to C++ and hello to managed code. I've even spent the last few years stressing VB in our company because it's so easy to get a warm body, and languages like VB now stand as true equals to C++. The differences between VB 6 and C++ 6 were vast. There was really no other choice - C++ FTW.

But I'm sold on managed code. They were right and I was wrong. Really, I just didn't want to give up my preciousss. C++ is a powerful and unforgiving language. We used to say it's a loaded gun pointed at your head by default. Now I have the same power (and performance) and everything has rounded edges for my protection and convenience. We're building systems where the reliability can only be described as ridiculous. I have .NET web applications in service 5+ years totally incident free. That was unheard of when we were doing C++.

I used to be the Boundschecker Nazi of wherever I worked. You pull up BC and then run the library to suppress the leaks in Windows. Then you set the library to suppress the leaks for BC, and then the libraries for whatever dependencies your code has. Then you finally get to your own memory and resource leaks. Then after a few years working with BC you become totally jaded because every single piece of executable C++ code written in the history of man has leaks the first time through. They can be stamped out, but it's so time consuming. With .NET that all goes away. A little bit of the power goes away with it, but I'm convinced it's a fair tradeoff.
Ddrak
Save a Koala, deport an Australian
Posts: 17516
Joined: Thu Jan 02, 2003 3:00 pm
Location: Straya mate!
Contact:

Re: XHTML/Web Apps

Post by Ddrak »

I'm still getting into the swing of managing things and keeping on top of everyone's progress to head off problems before they become a real issue. Missed a few lately that came and bit me, but lessons learned. I just hate bitching at people when they're not doing as well as I think they should.

The SCADA stuff is a lot of fun. We do city traffic networks, so everything from traffic lights to getting data from freeways to controlling the big signs on the side of the road (L.A. Story style). We did a lot of work originally getting Windows (NT at the time) to handle real-time data efficiently but we've been offloading most of that to embedded linux boxes out in the field now and just using the Windows servers as a data center/analysis stage as well as the point of call for the UI. All sounds good in theory, but there's a hell of a lot of stuff to do in keeping all our customers happy.

One of our big problems has been UI. There's a lot of people wanting a hand in it, and we rarely get to talk directly to the end users (lots of government tape to get to the people that actually use the system, and everyone in between wants a say too). I'm all for your statements on UI - I really want to make something the customers love. I just know it's damn hard work.

On C++, I'm really enjoying it a lot more now we have boost behind us (especially shared_ptr and boost::bind). Memory leaks have pretty much disappeared because we just don't use pointers any more. Of course we just use that for server-side stuff and we're seriously working on transitioning to C# in the future, just have the issue that we can't "go dark" for a rewrite so need to phase things in slowly and without completely screwing up our architecture in the process. Lots of fun design stuff! :)

Dd
Image
Freecare Spiritwise
Grand Pontificator
Posts: 3015
Joined: Thu Mar 13, 2003 5:35 pm

Re: XHTML/Web Apps

Post by Freecare Spiritwise »

I used to do something similiar. Maybe it's something I already mentioned but I used to write C++ code for train traffic control systems to control huge rail lines like the NY subway and the Chicago L and a few in Canada and Aussieland which I can't seem to remember the names of. We were supposed to get into street traffic signals but we were mis-manged into the ground and never got the chance. The president was always on his Harley (complete with stripper girlfriend named, no shit, Suki). So it was only a 4 year run, but good times, good experience, and lots of drunk vague memories of limo rides in almost every major US city.

Never did make it to Perth, Australia though. They swapped me out at the last second and someone went in my place. He said that there's no women in Australia and they have spiders the size of house cats. :)

Yeah, I can related to the problems with managing developers. The old saying about herding cats. We're a small tight-knit consulting company and we don't have any of those problems. I've been there 5 years and I'm still the new guy. The owner has owned it 25+ years and we're run with military precision. About half of us work at home like me. There's a few people who'd rather be away from home in the office and there's a few that slack off too much and got their priviledge taken away. No limo rides or cash bonuses but everyone has a good deal (including our clients who we spoil) and everyone is happy. The owner is some old fashioned midwestern so called straight shooter and his kung fu is strong.

But yeah, traffic control systems based on web services, that sounds like really cool shit. That also brings up scary stuff like hacking into your stoplights and making them green both ways. At least with the railroads the software was considered a 'non-vital' system because the hardware had final say over things like that. You could tell the lights to change color and the bridges to raise and lower and the switches to move, but if you didn't tell it to do something safe it would ignore your request.
Ddrak
Save a Koala, deport an Australian
Posts: 17516
Joined: Thu Jan 02, 2003 3:00 pm
Location: Straya mate!
Contact:

Re: XHTML/Web Apps

Post by Ddrak »

That also brings up scary stuff like hacking into your stoplights and making them green both ways. At least with the railroads the software was considered a 'non-vital' system because the hardware had final say over things like that. You could tell the lights to change color and the bridges to raise and lower and the switches to move, but if you didn't tell it to do something safe it would ignore your request.
Nah - hardware interlock on the traffic lights too, all in EPROM inside the box on the side of the road (not even EEPROM). If you try to tell it to do anything it doesn't like - greens all directions, or even not enough time for the pedestrians to get across then the whole thing goes flashing amber. You'd have to actually get into the cabinet and rewire it to make it unsafe.

We really don't want to be too involved in the safety critical stuff because that would involve writing in something like Ada and having all sorts of regulatory nightmares whenever we find the need for a change. Having it all at arms' length and just managing the higher level functions is a much nicer place to be.

You're right about Perth - spiders and no women. Now if he'd come to the east coast, well just google "gold coast" and girls and you'll see what I mean.

Dd
Image
User avatar
Taxious
Rum Guzzler
Posts: 5056
Joined: Fri Apr 18, 2003 10:16 am
Location: Denver, CO

Re: XHTML/Web Apps

Post by Taxious »

I just went from working with PHP (Wordpress, Drupal, Moodle, etc...) to .NET here at work. Dd is right, PHP is pretty easy to pick up - it really doesn't have much new to it.

I want to get better with Ruby (and RoR) as it seems to be pretty cool/powerful from what I've seen so far.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Talaena
Prince of Jerusalem, Ohio
Posts: 627
Joined: Fri Dec 20, 2002 1:06 pm

Re: XHTML/Web Apps

Post by Talaena »

I've been coding in HP Eloquence for 8.5 years now. I'm in the stone ages. I had an job doing ASP coding before I took this one. I am so out of touch with technology now. I'm starting to re-write our Point of Sale system in PHP/SQL just to try and learn something that might be useful outside of this job. Some of the stuff mentioned in the thread made me turn my head like a confused puppy dog; and that's sad. I used to love keeping tabs on this stuff.
Ddrak
Save a Koala, deport an Australian
Posts: 17516
Joined: Thu Jan 02, 2003 3:00 pm
Location: Straya mate!
Contact:

Re: XHTML/Web Apps

Post by Ddrak »

I'm told Rails is a far better system to use than PHP, but have no first hand experience there. Might be worth a look, Tala?


btw - just out of the blue, anyone had any experience with git or mercurial? We're tentatively looking at some sort of distributed system to move to because subversion's branch merging leaves a lot to be desired.

Dd
Image
Post Reply