Archive for the ‘technology’ Category

5 Signs That Show it is the Time to Redesign your Website!

There are very few people who like changes. Changes are difficult, but they are important. Talking about the changes, let us talk about redesigning a website. Redesigning a website is like revamping your whole work portfolio. Your clients will not say to you that your website is old, and you should redesign it. Then how would you know if you need redesigning? Well, there are signs which you can see clearly. You may try to ignore those signs, but you also know that you have to address the issues. So, check out the signs which show that your website needs redesigning:

#1 It has been ages since you redesigned it.1

If it has been more than one year, then it is high-time to revamp your website. The technology is changing every day, so you also need to change or adapt it.

#2 The website is not responsive.3

As I said, the technology is changing on the daily basis that is why responsive websites have become too mainstream. Not having a responsive website means indirectly losing your customers. The websites which are not responsive, do not work on all platforms and devices.

#3 The bounce rate of your website increases.

2 The high bounce rate means non-interactiveness of your website. The reason could be the user interface, the theme or may be the design.

#4 It takes forever to load a page.

4 Page loading is one of the most important things. According to a survey, the user hardly waits more 2-3 seconds for loading a web page. If the page does get loaded the user simply leaves the website, which also increases the bounce rate.

#5 Your website uses flash.5

  Flash was an age old technology. If you are still using flash player, then you are living in the old world. iPhones and iPads do not support it, and also the websites using Flash are not index-able in the search engines. So, these are the reasons why re-designing is important. It is not just for the users, but it is important for business purposes. The world in flowing with the wave of digitisation, and you should also try it.

Code Generation with Bake all in CakePHP

Each MVC module contains a Model, a Controller and multiple views for each table in the application. It can be a big pain to write all the controllers, models and views for your application from scratch and define the relationships. Not only it’s time consuming, banal, it is prone to errors in defining relationships and constraints. To make life easy its time to use Cake’s scaffolding console for code generation, known as Bake. Launching Bake: For Baking, we will have to use PHP executable. Rather than typing PHP path each time, I prefer to include php executable path to the environment variable paths, for comfort rather than necessity. For windows, it’s accessible via -> Right click on “My Computer”->Properties. -> Go to “Advanced“ tab. Click on environment variables. -> Go to system variable path and edit it. -> Add PHP path (Mine is xampp E:/xampp/php) and cake console (E:/xampp/htdocs/cake/console) paths, separated by semicolons. You might need to restart system after adding these paths. Sometimes the bake command doesnt work on windows even after changing environment variables. Make sure you use the correct forward slash for this when giving path for console and php. Sample Path post editing should look like C:Documents and SettingsEnbake>path PATH=C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesTortoiseSVNbin;E:/xampp/htdocs/campaign3/cake/console;E:/xampp/php;

Sample PATH variable

Time for pre heat Go to the app folder of your application through console. Type “cake bake”. This will give you following screen.  We have two options here:
  1. If your database.php is updated with connectivity settings, this will pick existing tables and give you option to bake them. Cakephp Bake Console
  2. But if DB information is missing in databse.php, we can configure it using ‘D’ as an option to bake. It will prompt us for all the settings and create necessary models, views & controllers.
Super Bake : bake all If you are sure about your DB and don’t want to go individual on baking separately for MVC, you can avail option of bake all. Instead of models this time it will ask you for each entity and on pressing the number it will create models, controllers and views. Hope baking will be as simple as walking through the cake & will save you precious time in coding skeleton for controllers, models and views. Especially when doing a feasibility study or brief demo to the client on the app. Optional Enhancements: Over 1.2 the recent released 1.3 bake has had a significant jump, and a number of features and enhancements have been added.
  • New tasks (FixtureTask and TestTask) are added to the main bake menu
  • TemplateTask has been added for use in the shells.
  • All the different bake tasks now can use connections other than default for baking. Using the -connection parameter.
  • Multiple validations on models has been added.
  • Self Associated models using parent_id are now detected. For example if your model is named Thread, a ParentThread and ChildThread association will be created.
  • Baked Tests include as many fixtures as they know about, including plugin detection (plugin detection does not work on PHP4).
Happy Baking !!!