I'm having a bit of a poke aorund the source code and just wondering if anyone can give me a bit of a 10,000ft view of it, bits of interest, stuff I should really look at, bit I can safely avoid etc.
I'm keen to see the XSL library of goodies so I can get a better idea of whats in there and how they work (I'm tempted to add to the Wiki docs on some of these).
Also what about the actual rendering, I've got an idea for a JS/CSS compressor which would need to mess with the rending similar to how the register JS file extension works I guess.
Any pointers, gotcha's and suggestions greatfully accepted :)
I'd start with the config files in the config folder. Familialise yourself with everything that can be configured. It's also worth looking into how the xslt extensions and 404 handlers are loaded.
Then move on to the events model. Create a ApplicationBase class and hook into the Document event model (New, Save, etc). Try modifying documents before they are saved.
Then create your own custom dataype, there's two ways you can do this. Try the easy way first... then look for the more difficult (but more flexible method).
Then create a new Section (or App). There are some great tutorials in the forums on this. Creating the section is relatively simple, but try creating your own Tree (extending ITree) and you can really go to town.
Finally explore the interfaces dll... see what else you can do.
You will fin the umbraco.library extension in the $\umbraco\presentation\library.cs file. I've learned a lot about how they work by looking at the source.
It really depends what you're trying to achieve from looking at the source code. If you're wanting to learn good programming style and design I don't suggest reading Umbraco, there's lots of sections would could be done a whole lot better.
Just a point of note, you mentioned that you have an idea for CSS & JS compression, that's actually something we're putting into Umbraco 4.1, there is also a package which Peter produced (http://our.umbraco.org/projects/peterdcompress).
If you just want to learn the source it's best to work out what you want to focus on, here's the major project roles:
umbraco - UI project, handling the displaying of pages, etc
umbraco.cms - Mostly back-end, writing to the DB, etc
I've just moved the client dependency library into a standalone library on codeplex... this is what is implemented in v4.1 and is what is being used for compression, etc...
I'll be writing up a blog post, documentation, etc... for this shortly.
It's very useful for developing in teams since you don't have to worry about what other client files people are including. It will also be very helpful for package creators in Umbraco so they can just tag their packages with client file dependencies and not worry about how they get rendered.
Poking around the code, where to start?
I'm having a bit of a poke aorund the source code and just wondering if anyone can give me a bit of a 10,000ft view of it, bits of interest, stuff I should really look at, bit I can safely avoid etc.
I'm keen to see the XSL library of goodies so I can get a better idea of whats in there and how they work (I'm tempted to add to the Wiki docs on some of these).
Also what about the actual rendering, I've got an idea for a JS/CSS compressor which would need to mess with the rending similar to how the register JS file extension works I guess.
Any pointers, gotcha's and suggestions greatfully accepted :)
Hi,
I'd start with the config files in the config folder. Familialise yourself with everything that can be configured. It's also worth looking into how the xslt extensions and 404 handlers are loaded.
Then move on to the events model. Create a ApplicationBase class and hook into the Document event model (New, Save, etc). Try modifying documents before they are saved.
Then create your own custom dataype, there's two ways you can do this. Try the easy way first... then look for the more difficult (but more flexible method).
Then create a new Section (or App). There are some great tutorials in the forums on this. Creating the section is relatively simple, but try creating your own Tree (extending ITree) and you can really go to town.
Finally explore the interfaces dll... see what else you can do.
You will fin the umbraco.library extension in the $\umbraco\presentation\library.cs file. I've learned a lot about how they work by looking at the source.
It really depends what you're trying to achieve from looking at the source code. If you're wanting to learn good programming style and design I don't suggest reading Umbraco, there's lots of sections would could be done a whole lot better.
Just a point of note, you mentioned that you have an idea for CSS & JS compression, that's actually something we're putting into Umbraco 4.1, there is also a package which Peter produced (http://our.umbraco.org/projects/peterdcompress).
If you just want to learn the source it's best to work out what you want to focus on, here's the major project roles:
If you are interested in css & js compression, I use http://www.codeplex.com/MbCompression It give me nice control which optionc turn on/off.
slace, out of curiosity, where can I read source code of a well written application...
Designetic: Ha! I'd love to know as well ;-)
Have a look at this Stack Overflow topic!
I've just moved the client dependency library into a standalone library on codeplex... this is what is implemented in v4.1 and is what is being used for compression, etc...
http://clientdependency.codeplex.com/
I'll be writing up a blog post, documentation, etc... for this shortly.
It's very useful for developing in teams since you don't have to worry about what other client files people are including. It will also be very helpful for package creators in Umbraco so they can just tag their packages with client file dependencies and not worry about how they get rendered.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.