Friday, January 27, 2012

My answer to "Search Engine Optimization"

This is my answer to a Question on Support site for LampCMS project


Are you talking about the main page only?
What do you mean by 'description', do you mean the description meta tag?

I just modified it so that a description that you set in !config.ini as SITE_NAME will be set as default value for 'description' meta tag.

In any controller you can override this at any time by adding this anywhere inside your main() function in any controller:

$this->aPageVars['description'] = $this->_('My cool site');

In this example 'My cool site' will be a translation string, so you can even translate it in your xlif translation files.

If you don't want it to be translatable string then you can just hard code it
$this->aPageVars['description'] = 'My cool site';

As for "All questions" title, you can also modify it.
The best way to do this is to create a xliff file, even for the English strings, which I don't currently have.
This way you can "Translate" strings that are used on the site to your own values.

Look in /translations/messages.ru.xlf file
You can copy that file to your own language and even to messages.en.xlf
Then just write your own translated strings for any string that is used in this site. Anywhere in the code you see something like $this->_('some string') means it's going through translation object, trying to find value in the loaded translation array.

So if you add your own messages.en.xlf and define you own version of 'All questions' then your version will be used on the site.

I will soon make new commit to github, so the default value for 'description' will be there too.
The next changes I am working on is support for categories. Alot has been done already but I still have to write a controller and templates to render a view of all categories.

Thursday, January 12, 2012

My answer to "I really like this script and looks like everything i need But is there a mobile version?"

This is my answer to a Question on Support site for LampCMS project


It has a very capable RESTful API, with read/write methods.
You can build a mobile app for Iphone, Android, HTML5 with this API.

I will one day start working on mobile app, my plan is to work on Android app since I have some previous experience with Android development.

If anyone else is interested in this, please post here, we can work together on this, I will answer all your questions about the API we have, since it's not documented yet.

Sunday, January 8, 2012

My answer to "Password clear text in change password"

This is my answer to a Question on Support site for LampCMS project


You know this can be fixed by setting the 'type' of inputs to 'password' in the template.
I'll do it in the next release but you can already do this yourself, just track down the template that generates the password change form and change the input type="password"

that's all there is to it.

Tracking down to template is super easy because when site is run in debug mode the template names are added to the html source code.

My answer to "zendframework"

This is my answer to a Question on Support site for LampCMS project


I would not recommend it. This project, I mean the structure, the organization of classes, the autoloader, all work very well, acting as a full featured framework already.

Zend, is good framework but it's not going to be easier, it would be more difficult and less efficient if you were to use Zend. The reason I wrote everything from scratch is because I wanted to have a very efficient, very fast program.

I have given it alot of thought as far as rewriting it as a module for Symphone2 framework, since the whole approach to loading classes using dependency injection (out Registry class) is very similar to Symphony approach.

So if would be easier to port this to Symphony2 than to Zend, but then the question is why?
If you want to make it slower and more difficult to use then go ahead, port it to Zend, just include my copyright on modueles you going to reuse and rewrite.

As for me, I thought of rewriting it in Java just because in would be even faster in Java, but the speed gain would only mean anything if this project was used in a super highg traffic site where you get thousands of requests per second - not per minute but per second. And again, I had (still have) an idea to write it in Java but only to write the RESTful api service, no UI at all, then wrote UI completely in JavaScript for the web, mobile etc. Also can write Android and Iphone native apps using the API. Only for this type of service it's going to be worth it to rewrite it in java and then it can probably compete in scalability with big social network type of sites.
I recently took time to learn about Java Spring framework, Jersey framework and Guise frameworks, but this was just a research type of thing, have not decided on either one. Spring is something that worked for me, but I think Jersey is better for just RESTful service with no frontend, but I could not make Jersey to work in my environment, I saw many people are having the same difficulties getting Jersey based API to even work.

By the way, if anyone has experience with Java Jersey framework or with Spring, especially with Spring MVC, I am very interested in collaboration and starting a super-high efficiency API.

So in conclusion, I does not make sense to port this project to something slower, only to something that would be faster (Java or C++, but C++ is way to unfriendly as a language, so I have to pass)

The way it's written now, this program can handle couple of million page requests per day on a single server easily, then can add more servers and scale.