Easy form population with jQuery and the Populate plugin
- Posted by Dave Stewart on September 18th, 2008 filed in Ajax, Easy, Forge, Formation, From the web, Kohana, Medium, Tutorials, jQuery
- 22 Comments »
A brief overview of the problem
The massive explosion in web applications over the past few years means that more and more data than ever is being saved and loaded from databases. Web application frameworks such as Kohana take a lot of the grunt-work out of the process of shunting data around, but there are still areas where manual work needs to be done.
One of these areas is in HTML form views, where you’re echoing your data back from the database into form fields such as text boxes, radio buttons and dropdowns.
Of course there are various ways to make this easier, most of which involve some level of automation, but all of which involve writing more, not less, PHP code.
So what if I told you you could populate any HTML form from your models with:
- One single line of PHP code?
- One single line of JavaScript code?
- And you kept your HTML forms 100% clear of PHP?
Default controller for serving static pages
- Posted by Dave Stewart on August 22nd, 2008 filed in Kohana, Medium, Tutorials
- 22 Comments »
A brief overview of the problem
A framework such as Kohana is really useful when serving lots of dynamic pages, as it allows you organise both your thoughts and your code into folders, creating order from what could potentially be chaos, at the expense of having to adhere to a structured way of working, in this case setting up controllers and methods that are correctly mapped from URLs (routes).
Whilst this is necessary for dynamic content that needs access to models, helpers and such like, it’s quite a lot of overhead for static content that literally just needs to be output to the browser within the context of your website’s page template. If you’re not careful your controllers can very quickly end up bloated with itty-bitty “view this page” methods.
What would be great would be some magic method to automatically handle static content (view files), without having to set up an actual controller and method, that way all you really need to worry about is the view folder, and you leave your controllers folder and the actual controller classes nice and lean.
Read the rest of this entry »
Initial setup of a Kohana project, revisited.
- Posted by bennythemink on August 15th, 2008 filed in Easy, Kohana, Tutorials
- 10 Comments »
Hi again folks,
The last article dealt with setting up a single web application, but what if you need to set up multiple applications? For example I need to set up a site that is comprised of an administration application, a private section for our sales department and a public site.
Well its actually very easy! Using the structure defined in the original article copy and paste the applications directory for each web app your going to create, giving each a unique and meaningful name, e.g. app_sales, app_admin, etc. You should end up with something like the following: Read the rest of this entry »
New design for Kohana sites
- Posted by dlib on August 13th, 2008 filed in Documentation/API, Kohana
- 5 Comments »
There are some interesting discussions going on in the Kohana forums regarding a new design for the Kohana websites. Right now, nothing is definite so if you have suggestions, you are a Photoshop/Illustrator expert or you hold a degree in usability, feel free to have your say.
The goal is to have a consistent look for the website, documentation, forums, trac and this blog. Yes, this blog too will get rid of its standard WordPress theme.
Another thing happening in the forums is an effort to get the documentation up to date. If you want to help, read the thread as to what needs to be done and help us out. All the experts look at the changes being made so you don’t have to be afraid you break anything.
Kohana 2.2 API
- Posted by dlib on August 10th, 2008 filed in Documentation/API, Kohana
- Comments Off
As promised, here is a link to the Kohana 2.2 API Use it to write documentation or just as a reference, it’s all fine by me
The current trunk API is also still available. I try to give it a regular kick for some updates for those of you eager to follow svn development.
Anyway who wants to chip in with documentation writing, come to #kohana or to the Kohana forums or venture into the wiki for some direct editing.
On a side note, as you can see on the trunk API pages the codename for the new 2.3 release is kernachtig. A Dutch word that translates to ‘pithy, concise, brief’.