Let’s learn all about what MVVM is through practical examples.
(more…)
Category: CakePHP
-
MVVM Pattern – Model View View Model
-
Using the JsHelper in CakePHP to submit a form with AJAX
The JsHelper in CakePHP 2.x has replaced the AjaxHelper from CakePHP 1.x. I recently tried to implement the JsHelper without very much success; perhaps if I would have read the documentation more closely it would have been quite obvious what my mistake was. So in case you’re like me and often skim over long documentation of a helper when you just need one function, in my case: $this->Js->submit() then you can often miss very important information. This article will hopefully help clarify
it. If you want to further enhance some stuff I highly recommend Organizing data with the jQuery Sortable plugin. -
Using CakePHP to scaffold a new database table
With each new table you create in your database, you will typically need to create a model, controller, and one or more views to get started. CakePHP contains two solutions to get you started creating these files with minimal effort.
Scaffolding allows an application to perform the following four scenarios, known as CRUD: Create, Retrieve, Update, and Delete.
In CakePHP, scaffolding can be done in two different ways. The first way is extremely simple, but doesn’t provide the ability to customize easily. The second way requires a bit of setup time; however, once done, you have full control over customizing any aspect of things.
-
Using CakePHP with the jQuery Sortable Plugin
It’s time to permanently remove all “manual” sorting from the Internet. You know the one I mean where it has the up and down arrows – or even worse, the text box that accepts a numerical order input. By implementing the jQuery template Sortable Plugin, you will be able to provide a simple, but effective drag-and-drop ordering solution for just about any type of data! I’ve also got a lot of other jQuery tutorial examples for beginners.
In a recent article, I described the required HTML and Javascript code need to implement the jQuery Sortable Plugin on a gallery of images. If you haven’t already done so, please begin by reading this article because this one will gloss over those features and focus on how to implement this with CakePHP.
(more…) -
Cannot find module (SNMPv2-TC)
When I run PHP via the command line (aka php cli), I often would be spammed with the following error messages:
Cannot find module (SNMPv2-TC)
Cannot find module (SNMPv2-SMI)Messages like this would repeat for 30 or 40 lines. These errors would not stop my command from executing; however, it was extremely noisy when trying to see the output.