James 的个人资料James's Space照片日志网络更多 ![]() | 帮助 |
|
|
8月23日 Bug-fixed version of XsltxI've uploaded a newer, less buggy build of Xsltx to Skydrive that also has built in support for compiling different 'views' for a control, set at design time. There's a simple use of views in the samples if you want to have a look.
8月17日 Xsltx - bugs and plansWe've found quite a few bugs in the last build of Xsltx and we're busy fixing them - having an increasing number of uses and test cases for this is helping drive out the errors and omissions as well as the plain simple stupid bugs :). I'll post another build next week when it seems more stable. In the meantime, if you use it don't trust it - just for playing and feedback atm. 8月14日 Update to XsltxI had feedback recently from a few people I know who are interested in Xsltx, e.g. 'The Kid' and Rich Kennedy. Two big things they wanted adding were:
I've now done both of these and they make it a lot more useful - (2) in particular is really cool as you can now build a form using Xsltx and server controls without needing to write any code apart from to load and save the XML. Looking forwards other changes that may get done include:
Files posted on skydrive. Let me know if you want any other features or want some help. 11月22日 Updated Trinity.XsltxI've updated my Trinity.Xsltx framework, primarily to fix a few bugs. Other changes:
The updated version is available at the same link as before, at http://www.tesl.com/NR/rdonlyres/10DFD5E6-2D28-4F8B-A468-AA71E85A1684/0/TrinityXsltx.zip. 10月31日 XSLTX v1 availableI've spent the last two days tidying up my 'XSLTX' framework for using xslt with embedded server controls, postback event handling etc. which I originally mentioned in my previous blog entry.
A 'v1' release of the framework is up on the web and you can download it at http://www.tesl.com/NR/rdonlyres/10DFD5E6-2D28-4F8B-A468-AA71E85A1684/0/TrinityXsltx.zip. It's an installer which will do the following:
Uninstalling from add/remove programs will undo all the above steps - with the config files it re-edits them to remove the relevant entries rather than just copying the backup back over the modified file, so if you (or Microsoft) make any further changes after installing this framework and then uninstall, you won't lose them. I'm not going to blog extensively today about how to use it - the samples and CHM file should be enough to start having a play. Let me know if there's any problems, with the installer or otherwise, and I'll try and sort them out. Have fun! 10月29日 XSLT, ASP.NET Server Controls and ASP.NET 2 Build ProvidersI don't get to do much development any more - too many solutions to design, bids to respond to and difficult projects to sort out. But sometimes I get bored with all that and long for the fun life of .NET development
That's pretty much what happened last Christmas, when work wound down temporarily for a couple of days. I'd just been reading about ASP.NET 2 build providers at the time and it made me think about a long standing desire of mine: to merge the ease of data postback and event handling that you get with server controls with the elegance of XML data rendering that XSLT gives you. I've always loved XSLT (sure if you're used to imperative API based programming it takes a while to get used to the more declarative approach of XSLT) because I find for most non-trivial XML transformations it is more concise and much more readable and maintainable than .NET code. Even with a complex XSLT it's quick to work out what the target output is going to look like. Contrast that with relatively simple XML processing written using XmlDocuments/XmlTextReaders + XmlTextWriters (etc.) and personally for me it's 'no contest'.
Of course with what you get out of the box today, using XSLT to produce forms that will postback data, and then handle that on the server, is a pain in the neck that quickly puts you off touching XSLT in those scenarios. Solving this problem by giving XSLT developers the same control capabilities as ASPX developers is something I long for - if this worked and your data is in XML then this should be the only thing you'd use - far more appropriate than ASPX. I'm sure someone will argue with me about that - a good discussion to have :). Basically though my interpretation of XSLT + Server controls + postbacks makes it pretty much an improved superset of ASPX so I don't see that as a controversial statement.
There's lots of ways you could start to do that in ASP.NET 1.1 and much of the problem is the same. Build Providers just add some new possibilities and makes adding processing of new file types into the ASP.NET build process much easier. MSBuild potentially gives similar new opportunities for non-web projects as well (e.g. controls libraries). Another great advantage of .NET 2 is partial classes - it makes any such solution of declarative UI + code-behind much neater. Enthused by my new knowledge I set out to create the answer I wanted... XSLTX!
This was, as I mentioned, 11 months ago... I finished a draft working solution in a couple of days but was too busy to fully test it and soon got busy again. Since getting this space (mostly, I admit, to have somewhere to put my photos) I figured I might as well put a little effort into blogging stuff like that because otherwise it'll get lost and not used. Maybe, just maybe, someone will find it useful. Anyway, I'm going to tidy it up a bit and put it on gotdotnet or similar and then blog a bit more on what I've done and how to use it. What I'd really like to do is use VS extensibility features to make the developer experience much more seamless and feel like working with ASPX but that's a project for another week
I should mention that I'm not the only one to have had thoughts along these lines (though I didn't know that till today, when I bothered looking...). Have a look at the article Creating Dynamic ASP.NET Server Controls Using XML - it's not quite the same as what I've done but it's similar in concept, though on .NET 1.1. Back with .NET 1.1 XSLT was also significanly slower (XsltTransform has now been replaced by XsltCompiledTransform)... so maybe this is an idea who's time has come. |
|
|