425
I Use This!
Moderate Activity

News

Analyzed 8 days ago. based on code collected over 2 years ago.
Posted almost 20 years ago
For a change, I've taken break from bashing internals, and got back to real work. (More on DBDO later this week hopefully)One of my on-going projects, that has been dragging on longer than I would of liked is a shipping management application. I ... [More] think it's mentioned in the archives, but for anyone who missed it, it is a mid sized XUL application which deals primarily with the management of a trading companies shipping requirements. I originally outsourced the main development, and have been tidying up and refining the code as we near final deployment (which as usual has taken longer than expected.)This week I sat down and focused on the last major part of the project, reporting. Almost all the requirements for reporting include the ability to download an excel file of the data. So previously I had been making heavy use of PEAR's Spreadsheet_Excel_Writer. In using it, I had gone through various stages of evolutionWriting raw Excel_Writer code in PHP, This however becomes very tedious, is not amazingly readable, kind of breaks the seperation of display/computation. And tends to be less flexible over a long period of time.Using a gnumeric as a template and using XML_Tree to merge data with it and output via Spreadsheet_Excel_Writer, again this helped in terms of enabling a simpler API for spreadsheet writing, and moving some of the layout/look and feel into the Gnumeric template. But the code for doing this was not quite as elegant as I would have liked.Using Javascript to read HTML tables and create a CSV file, that is sent to the server, and back again as text/csv mimetype (forcing the browser to open it in excel/openoffice etc.). Which was nice from an architectural point of view, by lacked any formating.And finally this week. Using javascript to generate a Spreadsheet_Excel_Writer specific XML file (by mixing a XML template file and the HTML content of the page), sending it to the server, and then letting PHP use the DOM extension and simple iteration with Spreadsheet_Excel_Writer to generate the page.This weeks solution while not quite complete has a number of key advantages, some of which appeared after I started using it.No display level code goes into the Action->Data manipulation stage (we just store the data ready for the template engine/ template to render)It is possible to visualize the data prior to it ending up in the excel file.hence debugging the data output and finding issues is a lot quickerMore code reuse, the library for XML to Excel is simple to reuse, the code for extracting the data from the html and generating XML is simple enough for copy & paste. and maybe possible to create a js library eventually.It offers infinate possibilities for formating, and changing layout.Less memory intensive, the data retrieval/storage and excel file create are broken up into two seperate processes.The extended entry includes a few more details.... [Less]
Posted almost 20 years ago by Helgi Þormar Þorbjörnsson
So finally "finished" the layout of this blog and actually _wrote_ a blog post so now you guys can "enjoy" this blog ;) Jibby! As some of you might know, I've been splitting Validate into smaller packages, so called subpackages, now why am I doing ... [More] it you might be asking ? Well simply put, why should you need to download the whole freaking thing with US validation stuff and more when you only email validation ? :-) We'll try to release these great changes (hey we also have bugfixes and a lot of BC breaks! ;)) as soon as we can, but at the moment we're kinda stuck because of time issues, Pierre is working at PHP 5.1 stuff and I\'m busy with other things like the "rewrite" of the PEAR Tree package, some LiveUser work and a lot of other stuff not needed to be mentioned here, plus we both have a real life ... For real, I'm not lying O:-) Short list of changes over all packages: BC breaks to unify names. Coding Standard fixes. Bug fixes. Almost all functions have Unit Testing (anyone that wants to help, place contact me! :)) Some new functions added in many of the packages. And a lot more I guess, just read the real changelogs if you need it badly Anyhoo, here is a list of package that we will have when this all goes live: - AT - CA (new locale, done by Philippe Jausions) - CH - DE - ES - FR - NL - PL - ptBR - UK - US - CreditCard - ISPN - Finance (might be renamed to IBAN) And finally is of course the main Validate package that containes email validation and similar things, so we have a lot of goodies coming up for ya guys and for those peeps that whine about LOC, hey we brought Validate.php to less then 500 lines WITH comments! Well okey I have not had time to add the new header standard file thing bingy that PEAR has, that will probably push it to 600 lines, but still it will all be comments. Ohh did I mention, most of those packages don't use PEAR, not even the error stuff! (tm) That will probably make some of you people dance For sure the main Validate packages doesn't use the PEAR error handling, that I'm sure of. Now, to talk a little about these 2 "new" packages, ISPN and CreditCard which previously were a part of base class of Validate. ISPAN (International Standard Product Numbers, yes that's a made up word) has validations such as ISSN, ISBN, ISMN, EAN8, EAN13, EAN14, UCC12, SSCC. What are those ? Well as the name describes, those are International Standard Product Numbers, for things like books, CDs, shipping numbers and more, just use google to find out more Now the CreditCard package is a really interesting one, probably a thing many people have looked at but were sure if they should use, now Philippe Jausions took that package and has made some impressive changes and it's a lot more usable then before he took over maintaince so this is something you boys and gals should take a look at! We're even hoping that Payment_Process will start using this package instead of their internal class to do this same thing. Those that are interested in looking at how things are now should go to the cvs viewer and more importantly if you're interested in gettnig a new validation package into PEAR (under Validate) then contact me or Pierre, we're seeking for more locales and of course tho other kinds also! Ohh yeah also, do note, authors of those local packages and such have gotten lead status over them so it won't do any good to email me nor Pierre over addition to them, either email the given package lead or use the bug system, if everything fails and you get no answer at all then it's okey to email me, just to make that clear, I've no time to maintain or answer questions for for ssn in Polland or something :D [Less]
Posted about 20 years ago
Article originally from rooJSolutions blog Seeing Davey's missery, and Sebastian's / Kristian's fixes to Serendipity to stop trackback spamming. I struck me that perhaps trackbacks combined with blog spammers are always going to be a ... [More] disaster waiting to happen.The concept is quite nice, being able to see related articles, when reading a blog, but the trackback concept is a little too trusting, unless you want to go in and moderate trackbacks.It inspired me however to hack up a smart referer log for my blog entries. (visit the site to find out more..) [Less]
Posted about 20 years ago
Article originally from rooJSolutions blog Seeing Davey's missery, and Sebastian's / Kristian's fixes to Serendipity to stop trackback spamming. I struck me that perhaps trackbacks combined with blog spammers are always going to be a ... [More] disaster waiting to happen.The concept is quite nice, being able to see related articles, when reading a blog, but the trackback concept is a little too trusting, unless you want to go in and moderate trackbacks.It inspired me however to hack up a smart referer log for my blog entries. (visit the site to find out more..) [Less]
Posted about 20 years ago
Seeing Davey's missery, and Sebastian's / Kristian's fixes to Serendipity to stop trackback spamming. I struck me that perhaps trackbacks combined with blog spammers are always going to be a disaster waiting to happen.The concept is quite nice, being ... [More] able to see related articles, when reading a blog, but the trackback concept is a little too trusting, unless you want to go in and moderate trackbacks.It inspired me however to hack up a smart referer log for my blog entries. (visit the site to find out more..) [Less]
Posted about 20 years ago
Article originally from AK BK Consulting blog Seeing Davey's missery, and Sebastian's / Kristian's fixes to Serendipity to stop trackback spamming. I struck me that perhaps trackbacks combined with blog spammers are always going to be a disaster ... [More] waiting to happen.The concept is quite nice, being able to see related articles, when reading a blog, but the trackback concept is a little too trusting, unless you want to go in and moderate trackbacks.It inspired me however to hack up a smart referer log for my blog entries. (visit the site to find out more..) [Less]
Posted about 20 years ago
Article originally from AK BK Consulting blogAlot of people started using blogs as a slightly better media for technical information, but it's becomming evident that with subjects ruby on rails, and some of MS astroturfing with marketing material ... [More] , that blog aggregators like Artima have been abused heavily with rather second rate blogging, about 3rd rate tools.While ruby on rails is probably a good tool, it fails in a huge part from the flawed thinking that one provider can deliver a complete solution. It took me a long while to realize that attempting the complete toolkit that ror promises is often fruitless. It rarely delivers much beyhond the intial demostratable examples. What normally happens is that in designing for a single solution (A super fast web interface to databases), you often end up with libraries that are rather poor for generic usage.The fact that PHP already has 3 or 4 projects that are based on PEAR, that deliver pretty much the same solution as ror. Indicates that the concept of small flexible libraries, maintained by seperate individuals, rather than one super mega project is always more valuable, although I guess you miss out on the hype more. [Less]
Posted about 20 years ago
Alot of people started using blogs as a slightly better media for technical information, but it's becomming evident that with subjects ruby on rails, and some of MS astroturfing with marketing material, that blog aggregators like Artima have been ... [More] abused heavily with rather second rate blogging, about 3rd rate tools.While ruby on rails is probably a good tool, it fails in a huge part from the flawed thinking that one provider can deliver a complete solution. It took me a long while to realize that attempting the complete toolkit that ror promises is often fruitless. It rarely delivers much beyhond the intial demostratable examples. What normally happens is that in designing for a single solution (A super fast web interface to databases), you often end up with libraries that are rather poor for generic usage.The fact that PHP already has 3 or 4 projects that are based on PEAR, that deliver pretty much the same solution as ror. Indicates that the concept of small flexible libraries, maintained by seperate individuals, rather than one super mega project is always more valuable, although I guess you miss out on the hype more. [Less]
Posted about 20 years ago
Article originally from AK BK Consulting blogAfter quite a few email conversations about HTML_Template_Flexy, I finally got round to documenting one of the javascript libraries I've modified. This is still a bit buggy around the edges, but is pretty ... [More] much working.Javascript Calendar started off with a few hacks around the dynCalendar on pear.php.net, and evolved into nice clean simple Calender renderer.The main design criteria for this was that it should be independant of the HTML page, not requiring any specific javascript, or changing the backend Template code. Just include the javascript file, set the style, and add a few extra attributes to the input elements. [Less]
Posted about 20 years ago
After quite a few email conversations about HTML_Template_Flexy, I finally got round to documenting one of the javascript libraries I've modified. This is still a bit buggy around the edges, but is pretty much working.Javascript Calendar started off ... [More] with a few hacks around the dynCalendar on pear.php.net, and evolved into nice clean simple Calender renderer.The main design criteria for this was that it should be independant of the HTML page, not requiring any specific javascript, or changing the backend Template code. Just include the javascript file, set the style, and add a few extra attributes to the input elements. [Less]