| Related sites for http://drknowledge.com/tinycrud/ |
| YourNet_Connection_Inc_ Provides web hosting and design to businesses in the Chicago area. | | Held,_Martin University of Salzburg - Computational geometry, computer graphics, program design, algorithms and data structures, computer-aided design and manufacturing. | | Alaska_Xbase++ A 32Bit compiler for the Clipper/Xbase language on the Windows platform. | | PinoyMac_org The online Filipino Macintosh community. A source of comprehensive, personalized Mac OS troubleshooting information and how-to's. | | The_Age_of_Spiritual_Machines__When_Computers_Exceed_Human_Intelligence By Ray Kurzweil; Penguin, 2000, ISBN 0140282025. Description, and comments by technology celebrities. (2000) | | Clarifying_the_Fundamentals_of_HTTP Analysis of HTTP/1.1, identification of its failures, and suggestions for improvement. By Jeffrey C. Mogul of Compaq Research. (May, 2002) | | CTDLC_Faculty_Services CTDLC helps faculty and corporations develop material for online courses, and offers web services for Connecticut's businesses. | | Literate_Programming The WikiWiki entry point for related information and discussions. | | Roger\'s_Access_Library A compendium of Access 97 and 2000 routines from various authors, many separated into distinct databases. Also a collection of white papers from different sources. | | 6502Em A commerical BBC/Master/Compact/Electron emulator for RISC OS 3.1 or above. | | Tango_Desktop_Project Aims to create a consistent graphical user interface experience for free and Open Source software. Style guidelines, basic icon library, and list of projects using tango icons. | | Eclipse_Tracker Documenting the History of the Eclipse Project. | | Python/XML_Libraries A collection of libraries to process XML with Python. [Open Source, Python license] | | DFWiNet Web site service provider, offering hosting, maintenance, design, and usability. | | OnPoint_Solutions Designing web sites that are content rich, visually engaging, and providing Internet strategy to keep visitors returning. | | Markings Provides site design and Internet marketing services. Located in Vancouver, British Columbia, Canada. | | Chinnerzinc Web design, shopping cart, ISP and domain registration. | | illuminArt_Calgary Offers design, application development, web databases, publishing and hosting assistance. | | iSummation_Technologies Providing design, e-commerce solutions, application development, database integration and maintenance services. Located in Gujarat, India. | | Chat-Attic UK based general chat community. Avatars, site rules and list of chat acronyms. |
|
tinycrud, a php framework based on W3C XML technologiesA:link, A:visited, A:active { color: #0000cc; }A:hover { text-decoration: none; color: #aa0000; }body { font-family: Arial, Helvetica, Sans; font-size: 14px;}p { text-align: justify; font-size: 14px; padding-right: 14px;}.t0 { width: 100%; margin: 0px;}.t1 { font-family: Arial, Helvetica, Sans; font-size: 14px;} .th { font-family: Arial, Helvetica, Sans; font-size: 18px; font-weight: bold; background: #eeeeee; background-image: url(/tinycrud/dotted-gradient2.png); border: 1px #333333 solid; padding: 4px;}.t2 { background: #bbbbbb; opacity: 0.7; filter: alpha(opacity=70%); padding: 4px; font-size: 14px;}li { list-style-type: circle;} .l2 a:link { color:#ff3312; }  tinycrud, a php framework based on W3C XML technologies Have you ever been sick of programming the same thing, over and over again? Have you ever looked at some of the frameworks out there and said, 'where do I begin?'. Do you like using XSLT, XPath, XSD, and DOM on a daily basis? Do you program in php and mysql? Do you want something to do 80-90% of the boring work for you? Well this package might be worth a look. This project is not explained by 10,000,000 "...all ya have to do is..." statements, nor is it propped up by 50,000 lines of proprietary API code. tinycrud aims to build the lifecycle objects for creating, reading, updating and deleting (aka: CRUD) standard entities; in our case represented by mysql tables. The resulting code has no tight couplings to any other class libraries in order to run, which creates a very slim footprint during execution time. tinycrud is designed to distill code, not hold it hostage forever within it's tight framework grasp. And best of all, I don't care if you use it! The philosophy is simple: "get thee to XML as soon as possible". If you want to overlay an MVC metaphor, it's XML that is our sole data model format. Views are XSL, and our front controller uses reflective techniques to remain compact, yet customizable. To quote Albert Einstein, "Make everything as simple as possible, but not simpler.". How it worksCREATE TABLE `calllog` ( `calllogid` int(11) unsigned NOT NULL auto_increment, `phonenumber` varchar(20) NOT NULL, `melissadata` text, `notes` text, `calltime` datetime NOT NULL, `prospect` enum('0','1') default '0', `lastmodified` timestamp NOT NULL, PRIMARY KEY (`calllogid`), UNIQUE KEY `calllogid` (`calllogid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 mysql tables are reverse-engineered into XSD documents. Type-binding occurs between mysql data types and intrinsic XSD types. Custom XSD types exist to represent specific mysql data types, eg: NULL or positive integer. You as the implementor can invent your own XSD types. A good example is a regular-expression for an email type. Instead of thinking in the traditional 'create-table' mindset when you architect new entities, you have to think of the XSD as the more detailed and authoratative source for the schema of an entity. Metadata about visibility, data types, and serialization is tucked away in the <xsd:appinfo> subtree, as defined by the XSD standard. See Extending Schema. Now that we have an XSD containing all of our database DDL and meta-data about php attributes, we can transform this with XSL into several goodies. First, we have an XSL file called scheminator.xsl which builds a boiler plate php class, and all of the necessary mysql 5.x stored procedures. It produces a singleton, and there is no plan to build composite entity strategies, foreign key identification, or any other type of linking magic; you should code this part. Also, you code list handlers by writing custom SQL which is converted to XML and tucked neatly within the enclosing DOM context. Secondly, the XSD is transformed into the default form, or forminator.xsl, and uses the intrinsic and custom types defined in the XSD to insure type safety onchange of any element on the client-side. In other words before a change is dispatched via AJAX, the field is checked against a dynamically generated Javascript sanity checker. A default "front controller" exists to deliver forminator (remember our default form) and to catch the response to field updates which are dispached as AJAX calls. So forminator is a data-bound form that sends update events to our default front-controller. The front controller maps form field names to class members, and calls the save() method. Imagine the front controller's job is to capture the HTTP request, access the noun and verb associated, procure the proper class(es), bind the HTTP request collection to object members, and call save. In more complex interactions, it may be procuring one or more objects and linking them together, or calling cascading deletes.Handling change, mindless and bug-resistant revisions with vimdiffHere is the lifecycle of the build process (special thanks to Clint Byrum on showing me vimdiff!):./make.sh xsdRuns through application.xml and explodes every mysql table into a respective XSD file in /xsd/templates/Then you vimdiff /xsd/Class.xsd /xsd/templates/Class.xsd and visually bring together the changes that belong. Because every layer is customizable, you don't want to auto-diff the files (usually)../make.sh classesRuns through application.xml and transforms every XSD document in /xsd/ to a standard php class file in /lib/classes/templates/Then you vimdiff /lib/classes/Class.php /lib/classes/templates/Class.php and visually bring together the differences../make.sh procsThis calls each class file in /lib/classes/Class.php?action=procs which drops and re-builds all stored procedures for the given object. They are stored within the respective class so that they can be versioned (subversion in our case). There are no compatability nightmares when you roll back, because the stored procedures match the class definition../make.sh validate (optional)Looks in application.xml for classes that require validation. This will load the class with the given test key, call toXML() and then check it against it's XSD for validity. Imagine this process takes us full circle: we are retreiving a record, serializing it toXML, then validating it against the very same schema that created the class in the first place. This works very well in development to find out when the schema does not match up against the data in the database. make.sh validate helps when customizing your own data types to flush out errors in the XSD customization process, and you can write mini programs to rip through an entire table for higher-level data integrity checks, eg: NULL or valid email. So why are you doing this? Why not use (XYZ)?Does this project sound like other projects? Rails, AppFuse? Well nothing is invented in a vacuum, and this idea is most-certainly not rocket science. What is important is the implementation of many other language-independant standards in this project. The inspiration for this project was that I could not find anything based on primarily XML technologies that did the job in php (NOTE: since then others have popped up see here). I had other friends and colleagues using XSD at the time, and it wasn't a far stretch to use is as the basis for entity declaration. Furthermore, as I studied other frameworks in Java et. al., I found that they were shrouded in complexity and constant revisions that broke compatibility (many have since settled down, and I have alot of respect for those). I just want to write code (and as little as possible), not run on the treadmill updating and testing the landscape every time a new version of the framework is released. (end rant)Yes, I love Java (on the client... see: my Java XML GUI widget library), but over time I have gravitated towards php on the server. The idea of this project is that ~65% of your code will be 100% portable, due to the standardization of the dependent technologies: XML, XSL, XSD, XPath and DOM. If you wanted to, you could rewrite your own scheminator that produces Java or perl classes, and still employ the entire view (xsl) layer and entity declaration aspect (xsd) without modification. Therefore I like to say that the framework is resiliant to language changes.BSD License  |
|