Model-View-Controller Component - Part 2 - Adding a Model Introduction In the first tutorial of this series, creating a simple view-controller component using the Joomla! 1.5 CMS framework was demonstrated. In the first tutorial, the greeting was hardcoded into the view. This doesn’t follow the MVC pattern exactly because the view is intended to only display the data, and not contain it. In this second part of the tutorial we will demonstrate how to move this out of the view and into a model. In future tutorials we will demonstrate the power and flexibility that this design pattern provides. Creating the Model The concept of model gets its name because this class is intended to represent (or ‘model’) some entity. In our case, our first model will represent a ‘hello’, or a greeting. This is in line with our design thus far, because we have one view (’hello’), which is a view of our greeting. The naming convention for models in the Joomla! framework is that the class name starts with the...
an Administrator Interface Introduction In the first three tutorials, we have developed a MVC component that retrieves its data from a table in the database. Currently, there is no way to add data to the database except to do it manually using another tool. In this tutorial, we will develop an administrator section for our component which will make it possible to manage the entries in the database. Creating the Basic Framework The basic framework of the administrator panel is very similar to the site portion. The main entry point for the administrator section of the component is admin.hello.php. This file is identical to the hello.php file that was used in the site portion except the name of the controller it loads will be changed to HellosController. The default controller is also called controller.php and this file is identical to the default controller in the site portion, with the exception that the controller is named HellosController instead of HelloController. This difference is...
Sưu tầm từ link này: http://android.stackexchange.com/questions/41146/creating-app-and-swap-partition-for-android?rq=1 /system : This is mounted read-only in normal mode, and the place where "the system" is installed (Android core apps plus most of the pre-installed "bloatware"). No matter if it shows "220 MB available", as a normal user cannot make any use of that "free space" internal storage ( /data ): This is where the user installs his apps, and where all the user data reside. Most crucial part, and the place where your report states "11 MB free" -- which most likely will trigger the "insufficient memory" error, see insufficient-memory ). To free up space here, you can do things like... uninstall apps you once installed but no longer need (most efficient part) move apps to SDCard (see app2sd ). Apps must explicitly support this (though there are root-methods to enforce the others, it might have side-effects). Still,...
Nhận xét
Đăng nhận xét