Tag Archives: Application

Building cake application (Part VI)

Saturday (Day 6)

Problem with validation messages while translating
Although my native language is Bulgarian and the requirement from the client was to have this site only in Bulgarian, I’ve preferred to have it in English and to make the translation with the i18n functions of CakePHP. There are 2 reasons to do this:

1. This will give me the possibility to show you the result of all these days of coding and
2. I can reuse some part of the codes the same as I’ve used in this project

So, up to my experience having application in English is never a bad idea. πŸ™‚

You know, that the translating process is not very exciting process, but someone need to do it and because there is no one who can help me with this I’ve start the translation. Anyway. πŸ™

While translating I noticed that the most of the validation messages are not appear of the translation file. I knew this from my past experience, but I needed to find an easy and elegant solution to translate these messages instead of putting them in all views. Putting in the view you need to do this at least 2 times.
Continue reading

Building cake application (Part V)

Friday (day 5)

Constructing SQL statement for the search
Yep, today I need to finish the Profile search for the admin part. As I mentioned, the search is only by fields of experience, so there is no big and scary where clause /especially if you want to cover all cases, like splitting the words with AND, OR etc. will cause huge where with all possible combinations/.

There are 2 specific requirements here: The results need to be ordered by relevance and the report need to show fields of competence which are match to the search criteria next to each row /user/.

What does it means? Let’s say there are 2 users. First one has following skills like Java, PHP, MySQL, HTML and JavaScript, the second one knew only JavaScript and HTML, so when we search for users matching criterion PHP and HTML, the search results need to be ordered like this:

User1 – matching fields: PHP, HTML – relevance 2 criteria matched
User2 – matching fields: HTML – relevance: 1 criteria matched
and so on.

At first glance it look like I had to build huge SQL including few sub queries or functions for fetching the fields of relevance and matching fields and I was prepared for at least one day to accomplish this task, but in fact it was very fast.
Continue reading

Building cake application (Part IV)

Thursday (day 4)

Today I need to go downtown again. I am quite unhappy, because this mean that I need to work extra later on, but there are priorities, as you probably know. Here is what I’ve done today.

Working on the administration part
Today, I’ve worked on the administration part. There are some small bugs and glitches which I needed to clear in the Key look-up tables such as, stripping down the Categories functionality – this application requires only 2 levels of nesting in the Fields of experience, so allowing the extra levels will confuse the customers.

fixing some bugs in the front end as well
I’ve still have troubles with the redirects in the Auth component. I know it’s all my fault but it’s really annoying. I need to check what exactly is the problem with this. πŸ™

Adding delete all related records to the external user’s profile
Back to the admin part. I needed to implement delete all related records interface – if an admin user decide to remove an External user profile – let’s say someone try to test the application, or just an appropriate user /spammer/ this action should delete all relative records to that profile.

The problem was that I thought that key node is ‘dependent’ while the right one is ‘exclusive’. So, it’s set to true in the hasMany, hasOne etc. and if the parent record is deleted all records in the child tables are deleted too.
Continue reading

Building cake application (Part III)

Wednesday (day 3)

Adding dynamic pages
Today, I’ve decided to add some extra functionality to the application by adding a dynamic pages functionality. The main reason why I did this was because this system needed an “About the application” page as well as other pages and I’d preferred to leave this task to the clients. I also think that with small effort I am giving good impression to the client.

Instead of replacing fully the pages controller, I’ve decided to leave them due to use them for some system pages such as, “Thank for registration” and some other simple pages which are required.

Simple horizontal menu
Added a very light horizontal menu. I like it because it’s really small and works perfect for 1-2 level menus.

Using textile for formatting
I’ve decided to use textile for the formatting of the dynamic page’s content. There is a solution with behavior class, but I found a helper solution, so the installation and configuration was quite easy. I’ve also find a nice help description which briefly explains how to use textile format which I placed above of the page content field.
Continue reading

Building cake application (Part II)

Tuesday (day 2)

I really hate to start working early in the morning. I’ve always trying to delay this step by reading some news, checking mails, etc. But job need to be done and I had to go downtown, so I’ve started early today.

Building external user interface
I’ve started with the external user interface, incl. login, logout, change passwords, I’ve also decided to move fields Name and E-mail from this page to the profile page etc. Most of the things went quite well, but there were some “problems” with autoRedirect var in the Auth component. Well they weren’t real problems, but wrong redirects while the user switch from profile to another /i.e. admin to regular user/. To avoid this I’ve decided to set that variable to false, and the login redirect will be fixed to a landing page. Anyway, the application is not so big and keeping the last place is not very critical. πŸ™‚
Continue reading

Building cake application (Part I)

Monday (day 1)

In that post these posts I am going to describe my working process and problems which I’ve met during the development of small CakePHP application. I am not going to go in details neither I will post any code snippets. It will be something like diary of the working process. So, let’s start.

The scope
It’s an Experts database with 2 parts:

  • External part – where all users could register and fill their resumes and field of qualifications
  • Administration part – administrators could provide the search in the resumes and mainly in the field of knowledge.

Continue reading

ClickHeat – track user’s clicks on your web site

Today … is the first day after my trip in Greece. Well it’s hard to be in good mood after a holiday and I couldn’t code as fast as I want for these first days, but this is another story.

I would like to share here some information about a marketing tool which I just saw. It’s called ClickHeat.
What is the main purpose of that tool? People which using already Google Analytics could see many things which are the same, but in fact there are differences which I am going to mention.
Continue reading

Google Docs

Today Google just released the Google Docs and Spreadsheets. I was amazed of the usability and simplicity of the tool.

Briefly, there are Explorer/Navigator part, which users could sort and manage their files. The new features here are the Folder management, which is nothing new in the world, but it’s handy especially if you have lot of documents.
Continue reading