Allen Holub: Say No To XML (As Programming Language); I Agree Allen Holub: dire di no a XML (come linguaggio di programmazione); sono d'accordo
Allen Holub (Author of Compiler Design in C and famous OO Guru) said: “XML is perhaps the worst programming language ever conceived. Allen Holub (Autore del Design Compiler in C e famoso OO Guru), ha dichiarato: "XML è forse il linguaggio di programmazione peggiore mai concepito. I’m not talking about XML as a data-description language, which was its original design. Non sto parlando di XML come una banca dati linguaggio di descrizione, che è stato il suo design originale. I’m talking about perverting XML for programming applications. Sto parlando di stà sovvertendo XML per le applicazioni di programmazione. It’s inappropriate to use XML as a scripting language (eg, ANT), a test-description language (eg, TestNG), an object-relational mapping language (eg, Hibernate, JDO), a control-flow language (eg, JSF), and so forth. E 'opportuno utilizzare XML come un linguaggio di scripting (ad esempio, l'ANT), un test-linguaggio di descrizione (ad esempio, TestNG), un oggetto-relazionale mappatura lingua (ad esempio, Hibernate, JDO), un controllo del flusso di lingua (ad esempio, JSF), e così via. These sorts of XML “programs” are unreadable, unmaintainable, an order of magnitude larger than necessary, and audaciously inefficient at runtime.” Questo tipo di XML "programmi" sono illeggibili, unmaintainable, un ordine di grandezza più grande che necessario, inefficiente e audaciously a runtime. " Link Collegamento
He surmised that the tendency to use xml for these tasks is simply because people either don’t want to create a compiler or are inacapable of creating one. Egli ha ipotizzato che la tendenza a utilizzare XML per questi compiti è semplicemente perché la gente o non si desidera creare un compilatore o sono inacapable della creazione di uno. I agree with him. Sono d'accordo con lui. Most of the time people use XML because it is easy to parse XML, so who cares how long it takes for people to create these xml documents in the first place. La maggior parte del tempo delle persone usa XML, perché è facile fare il parsing di XML, di modo che si prende cura il tempo necessario per le persone a creare questi documenti XML in primo luogo. Look at Hibernate for an example. Vedi Hibernate per un esempio. It is XML hell. XML è un inferno. EJB 2 was another example. EJB 2 è stato un altro esempio. Jelly was probably the worst example and I don’t like JSTL that much either. Gelatina è stato probabilmente il peggior esempio e non mi piace molto JSTL che sia.
Then he goes on to define the basic qualifications of a programmer, he said something which is close to my heart: Poi va a definire le qualifiche di base di un programmatore, egli ha detto qualcosa che mi sta a cuore:
“This list includes a deep understanding of data structures and key algorithms, a little math (set theory, logic, a little statistics), mastery of analysis-and-design techniques, both process (eg, RUP or XP) and structure (eg, design patterns), and database structure and use (eg, SQL). "Questo elenco comprende una profonda comprensione delle strutture dei dati e dei principali algoritmi, un po 'di matematica (teoria degli insiemi, la logica, un po' di statistiche), padronanza di analisi e di tecniche di progettazione, sia di processo (ad esempio, RUP o XP) e la struttura (ad esempio , Il design pattern), e struttura del database e utilizzare (ad esempio, SQL). You also need to know how the hardware works.” È inoltre necessario sapere come funziona l'hardware. "
Designing compilers is hard. Progettazione di compilatori è difficile. Today it is rare to see people designing compilers for their software. Oggi è raro vedere persone progettazione di compilatori per il loro software. They use XML or simple property files. Che utilizzano XML o semplici file di proprietà. Also, as he mentioned, it is hard to get books on compiler design. Inoltre, come ha detto, è difficile trovare libri sulla progettazione del compilatore. The best Java software to design compiler is Il miglior software Java per la progettazione del compilatore è JavaCC , which was by an ex-Sun employee, who later went on to found MetaMata in the dotcom boom era. , Che è stato di un ex-dipendente Sun, che in seguito è andato a trovare a MetaMata nel dotcom boom epoca.
He misses one vital point. Egli perde l'essenziale punto uno. Somewhere down the road it has unfortunately become a marketing bullet point to mention that your software uses XML for configuration. Da qualche parte lungo la strada si è purtroppo diventata un punto di commercializzazione di menzionare che il vostro software utilizza XML per la configurazione.
Filed under Elencato sotto Headline News Headline News , Java Software Software Java , Open Source Software Software open source , Technology Tecnologia | |
| |
RSS 2.0 RSS 2,0 | |
Trackback this Article | questo articolo |
Email this Article Invia questo articolo
You may also like to read Si può anche leggere come |




September 27th, 2006 at 6:25 am 27 settembre 2006 a 6:25 am
Some geeks fantasize about being with hot and sexy girls, only to come home and meet the wife (if they have any) who is far from hot and sexy. Alcuni geek fantasticare di essere con acqua calda e sexy ragazze, solo per tornare a casa e soddisfare la moglie (se sono presenti) che è ben lungi dall'essere calda e sexy. That, my friend, is reality. Che, il mio amico, è la realtà.
Allen Holub lives in a fantasy world. Allen Holub vive in un mondo fantastico. In reality, there’s always deadlines to meet, profit to achieve. In realtà, c'è sempre termini di incontrarsi, di realizzare profitti.
September 27th, 2006 at 7:14 am 27 settembre 2006 a 7:14 am
Wouldn’t it be more profitable in the long run to make your application easier to use, unless you also offer paid professional support services? Non sarebbe più redditizia a lungo termine per rendere il vostro applicazione più facile da usare, a meno che non si offrono anche pagato i servizi di supporto professionale?
Creating compilers is hard for us but creating xml files aren’t easy for end-users. La creazione di compilatori è difficile per noi, ma la creazione di file xml non è facile per gli utenti finali.
In my experience most of them are comfortable with Excel documents, complex xml is beyond them (obviously with exceptions). Nella mia esperienza la maggior parte di loro dimestichezza con i documenti in formato Excel, XML è complesso al di là di esse (ovviamente con eccezioni).
The downside of compilers is that they are not only harder to create but also harder for others to consume, unless you provide them with a parser too. L'aspetto negativo di compilatori è che non sono solo più difficili da creare, ma anche più difficile per gli altri a consumare, a meno che non fornire loro un parser troppo. We do however need a better solution than xml, especially for simple formats. Facciamo tuttavia bisogno di una soluzione migliore rispetto xml, soprattutto per i semplici formati.
September 27th, 2006 at 10:07 am 27 settembre 2006 alle 10:07 am
I got tired of doing “XML push-ups.” So I’m trying to focus my new development efforts on Ruby on Rails. I got stanco di fare "XML push-up." Così Sto cercando di concentrare il mio nuovo sforzi di sviluppo su Ruby on Rails. XML? There is none. Non vi è nessuno. Just YAML for configuration of database. YAML solo per la configurazione del database. Very nice! Very nice!
September 27th, 2006 at 10:29 pm 27 settembre 2006 a 10:29 pm
Yeah, maybe… Except a bad example (ok, problem with Ant, yeah, but it’s not like make is so easy to use, please, tabs, and spaces o my), and plugging his book with all the subtlety of a sledgehammer wasn’t too cool Sì, forse… Tranne un cattivo esempio (ok, problema con Ant, yeah, ma non è come fare è così facile da usare, per favore, schede, e gli spazi o il mio), e di collegare il suo libro con tutte le sottigliezza di un mazza non è stata troppo fredda,
September 29th, 2006 at 12:32 am 29 settembre 2006 alle 12:32 am
I had read his book - “Compiler Design in C” and I think it is of very high quality. Avevo letto il suo libro - "Compiler Design in C" e penso che sia di qualità molto elevata. So even if he is plugging his book, I think it is a good plug. Così, anche se si tratta di collegare il suo libro, penso che sia una buona spina.
Also everyone has their natural tendencies. Inoltre tutti hanno le loro tendenze naturali. A compiler designer sees everything as a compiler design problem, a OO designer sees the world as object oriented and so on. Un compilatore designer vede tutto come un compilatore progettazione problema, un progettista OO vede il mondo come orientato agli oggetti e così via. Beyond all that I still see lots of merit in his arguments against ubiquitous use of XML as programming language. Al di là di tutto quello che ho ancora un sacco di merito nella sua argomentazioni contro onnipresente uso di XML come linguaggio di programmazione.
March 5th, 2007 at 8:39 am 5 Marzo 2007 alle 8:39 am
I think, the author exaggerates a little. Penso, l'autore esagera un po '.
It is good that there is a simple format of configuration files. E 'bene che vi è un semplice formato di file di configurazione. XML is maybe verbose, but it is easy to learn. XML è forse verbose, ma è facile da imparare. And if everyone created a new format for each application, we would have to learn much more and it would take much more time. E se tutti creato un nuovo formato per ogni domanda, dovremmo imparare molto di più e ci vorrebbe molto più tempo. Do you remember sendmail configuration files? Ti ricordi sendmail file di configurazione?
March 7th, 2007 at 11:00 am 7 marzo 2007 alle ore 11.00
Yes, I do remember sendmail as well as the make files Sì, mi ricordo sendmail e rendere il file
I think xml for plain configuration is ok but not as a programming language. Credo XML per la configurazione di pianura è ok, ma non come un linguaggio di programmazione. Ant is a case where xml is used as a programming language. Ant è un caso in cui XML è utilizzato come un linguaggio di programmazione.
January 4th, 2008 at 4:25 am 4 gennaio 2008, 4:25 am
I have often seen people creating programming languages using XML. Ho visto spesso persone di creare linguaggi di programmazione utilizzando XML. I think that XML was not meant for that and does not suit that purpose. Credo che XML non è stata pensata per e che non soddisfa tale scopo. Prove of that is XUL, Flex MXML or even XForms, that end up using Actionscript or Javascript to do the business logic. Di dimostrare che è XUL, Flex MXML o addirittura XForms, che finiscono per Actionscript o utilizzando il Javascript per eseguire la logica di business. They use the XML part to layout the components and Actionscript or Javascript to do the serious work. Che utilizzano XML a parte il layout di componenti e Actionscript o Javascript per fare il lavoro serio. These make sense, because when we are creating the forms, we are marking (or laying) our UI components. Questi ha senso, perché quando stiamo creando le forme, noi siamo marcatura (o di posa) il nostro utente componenti.
When I started playing with XML, I thought it was going to be a solution for writing quick languages. Quando ho cominciato a giocare con XML, ho pensato che doveva essere una soluzione rapida per la scrittura di lingue. But, I came to the conclusion that XML is what it is: a markup language. Ma, mi è giunta alla conclusione che XML è quello che è: un linguaggio di marcatura. And it can be used for document design and for data design as well. E può essere utilizzato per documento di progettazione e per i dati di progettazione come bene. As for complex programming languages, I stick to writing compilers for them. Per quanto riguarda complessi linguaggi di programmazione, bastone alla scrittura di compilatori per loro. The language becomes so much cleaner than XML. La lingua diventa così molto più pulita rispetto a XML.
Now, as for compiler writing being a hard, I just answer \\\”when people don\\\’t know how to use something, they always say it is difficult\\\” Ora, per quanto riguarda la scrittura del compilatore è un duro, ho appena risposta \ \ \ \ \ "quando la gente don \ \ \ \ \ 't sapere come usare qualcosa, devono sempre dire che è difficile \ \ \ \ \"
It is not like in the old days whereby you would need loads of programmers to write a compiler. Non è come nei vecchi giorni in cui si avrebbe bisogno di carichi di programmatori di scrivere un compilatore. Today, a single programmer can put together a compiler, using current compiler frameworks, in a month. Oggi, un solo programmatore può mettere insieme un compilatore, utilizzando attuale compilatore quadri, in un mese.
Nowadays, you don\\\’t have to write parsers by hand. Al giorno d'oggi, è don \ \ \ \ \ 't hanno parser di scrivere a mano. You can put together a parser for a configuration file in a day or two. È possibile mettere insieme un parser per un file di configurazione in un giorno o due.
Compiler writing was, in the old days, very laborious. Compilatore è stato iscritto, nei vecchi giorni, molto laboriosa. Not anymore, because you have many frameworks that do half of the work for you. Non più, perché avete molti quadri che la metà dei lavori per voi. For instance, with JavaCC you can generate the lexer, the parser, the Abstract Syntax Tree using JJTree. Per esempio, con JavaCC potrete generare il lexer, il parser, l'Abstract Syntax Tree utilizzando JJTree. And then, you just have write the semantic analyser, intermediate code generator, code optimizer and the code generator. E poi, basta scrivere l'analizzatore semantico, generatore di codice intermedio, l'ottimizzatore di codice e il generatore di codice. But, that is very simple to do. , Ma, che è molto semplice da fare. It is similar to traversing XML nodes. E 'simile al XML attraversamento nodi. I usually see it that way. Io di solito in questo modo.
Finally, I would like to mention that there is a compiler framework called SableCC, which is very easy to use. Infine, vorrei ricordare che vi è un compilatore chiamato SableCC quadro, che è molto facile da usare. There is also an alternative based on SableCC, which allows us to write backend generators for other languages. Vi è anche un'alternativa basata su SableCC, che ci permette di scrivere generatori di backend per altre lingue. I have written two backend generators: one for Python and one Actionscript. Ho scritto due generatori di backend: uno per uno Python e ActionScript. The Python one is in the public domain. Python è nel dominio pubblico. The Actionscript one is still being used internally in my company. ActionScript è ancora in fase utilizzato internamente nella mia azienda. But will, eventually, be released to the public domain. Ma, infine, è accessibile al pubblico dominio. We used the Actionscript backend to write a SPARQL parser for Adobe Flex, and to write a compiler for a programming language based on Daplex. Abbiamo utilizzato la Actionscript backend per scrivere un parser SPARQL per Adobe Flex, e per scrivere un compilatore per un linguaggio di programmazione basata su Daplex. Well, we call it a framework, because it does more than generating database code. Ebbene, si parla di un quadro, perché non più di generare codice banca dati. It generates web applications that target PHP, Java, C# with either Ajax or Adobe Flex front ends. Che genera le applicazioni web che obiettivo PHP, Java, C # o con Ajax o Adobe Flex front-end.
Anyway, that is my two cents. Comunque, è che i miei due centesimi.
All the best, Tutti i migliori,
Fidel.