Skip to main content

XML: Is it worth


Yes, I confess, I don't like XML at all. Reason, It's way too complication and I personally feels like it's a waste of storage space. Please, don't tell me that storage(be it memory or disk) is so cheap now a days. I still care. May be because, I started my programming (Computer Science) education with mighty "C". I always prefer to squeeze memory and make my programs as small as possible, (reason, why I changed from C++ to Java, then to Python: not to mention rapid development.) .

Why use XML at all. There are good old RDBMS. Well if you find buzz about ODBMS, use them. Or use simple JSON. Or better, go for Google's ProtocolBuffers.
Web programming in Java, now days become full of xml configuration files.And it'll go on, getting multiplied as your system gets bigger, web services included and so on. So much work, if some one ask me about it! Thanks to web2py, I can make the same applications that I used to do with Java (on web) or with GWT (of course with pyjamas)  with absolutely no xml. I'm sure other python frameworks also qualify.

So, avoid xml as much as you can. I'll not, because, I (read, clients) still need Java based web solutions no matter there's no significant advantage they can derive from not using python but java, and make it take almost double or tipple time than it take, if it developed in python. I also use xml, because I'm an html coder too. (Well html now a days get standardized to add an 'x' before html ==> xHTML. So many things changed for bad coders. I have to change headers only)

Aaahhh,, we are deviating. so what's we are upto??
Oh I got, "XML"!!! Decide yourself. I've other things to do...

Comments

Popular posts from this blog

Correct way to structure your Django 1.4 projects

PS: This post is written assuming you're familiar with Django and at-least have some basic experience trying to set-up a Django project (for learning or for some cool project). Purpose: To show how to properly set-up your Django1.4 project after seeing other developers getting it wrong (seen it wrongly structured by my mentee, senior developers and junior developers at my firm.). Django 1.3 Project structure: Initial structure followed by two apps added to the project. Refer above picture, where I shown a Django < 1.4 project structure. (I know, at least Django 1.2 & 1.3 follows this structure). First tree view is of the initial structure that you will get by calling $ django-admin startproject Proj Take a note that manage.py, settings.py, urls.py are in the main folder. Following  tree display is after creating two apps named app1 & app2. You'll do it as follows $ ./manage.py startapp app1 $ ./manage.py startapp app2 Those apps are c

AJAX File Upload with Web2py

It was not that long, since I experienced a problem while trying to upload a file using an ajax  trapped form. I thought, it must be me doing something wrong. I was using web2py  to embed another page into a page via ajax. That is better known to web2py folk as LOADing a component. It's just happened that one of such component contains a file upload form. It was my first time using LOAD function provided by web2py. Basically it make use of jQuery to load the page via ajax into a target div and traps input of any form in that page, so that page doesn't reload. Oh, I forgot to say that web2py is bundled with jQuery. It's always boring and tedious to understand a problem without experiencing it. So, Let's play with an example, (PS: I"m using web2py a full stack python framework, but you can use any language at server side and this problem will be there because, it's a problem with ajax) My model which defines table like this, In RDBMS world, it column 

Set difference: Data provided from two big files with one number at a line

Today, I had to find out difference between two huge lists of numbers. Numbers are 17 digits long and list are of around 1 lac. PS: I'm documenting both versions here for my future reference. I used python, because diff doesn't felt good for me. because it will print both ins and outs of both files. Also, I ruled out diff's possibility, because I didn't felt it will work at that time. Later, at home: I give diff a try. Yes, it's not that beautiful as in python. I'd cut and sed a bit. But still, it's a "one liner" and I like 'em a lot.