Subject: Re: [xsl] Lesson Learned: Don’t write XSLT programs this way From: "BR Chrisman brchrisman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 17 Jul 2022 22:00:24 -0000 |
> Seems like a reasonable strategy, right? > > No, itbs not. Itbs a terrible strategy. > > Consider what happens once the project is over. Sometimes I can reuse > program#1 on another project (usually the program needs a little or a lot > of modification). program#2 is specific to the output produced by > program#1, so itbs not reusable. program#3 is even more specific. Ditto for > the other programs. In other words, at best program#1 is reusable. The > other programs are throwaways. What a waste. > > Not only are the programs throwaways, they are all tightly coupled to each > other: program#2 is tightly coupled to program#1, program#3 is tightly > coupled to program#2, etc. > > This code reusability concern is more appropriate to lower level/less powerful languages. Once we get to high level languages like SQL and XSLT, reusability doesn't provide much and, as you notice, costs a lot. Reusability is, in a lot of ways, a band-aid for using a crappy language. For high level languages, the problem space should directly convert to code without the need to build out new 'reusable' infrastructure pieces. What I use as 'reusables' are things that pre-process/transform xslt source prior to execution. Those, I can use in lots of places. The pipelining mechanism provides a whole lot of advantages.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Lesson Learned: Don’t wr, Dimitre Novatchev dn | Thread | [xsl] Re: Lesson Learned: Don’t wr, Roger L Costello cos |
Re: [xsl] Lesson Learned: Don’t wr, Dimitre Novatchev dn | Date | [xsl] Re: Lesson Learned: Don’t wr, Roger L Costello cos |
Month |