Wednesday, March 21, 2012

My answer to "LampCMS vs OSQA.net"

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


Yes, but it's Python and also uses Django framework and MySQL or some other type of Relational database. This program uses php and MongoDB. It's also light, no unnecessary frameworks, I wrote 90% of classes myself, the 10% is paginator from PEAR, EventDispatcher which I rewtore for php 5.3 and ACL from Zend which I also modified to be fully serializable to the ACL object can be stored in cache.

Another class from PEAR is HTML Sanitizer which is pretty good if used together with optional php tidy extension.

This program also has read/write REST API, not documented yet but you can search this forum for API. Basically you can already create some type of APP with it, be it for Android, HTML5 based app or just integrate with another program.

API even has feature to allow developers to register their own app, just you would do on Twitter developer site, can even upload your apps image.

There is still alot of work to be done, I plan to continue working on it every time I have some extra time.

My answer to "What was the motivation behind creating LampCMS?"

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


OSQA is written in Python and uses MySQL. I am not all that good at Python.
But I am pretty good at php, have been using it for almost 14 years now.

I also wanted to go with NoSQL database so that a Q&A site can grow to almost unlimited size without slowing down much. I have been using MySQL for many years, in fact using it daily at my current job and I know that at certain point when database grows in size the performance take a hit. This usually happens very suddenly, not gradually and then it's a never-ending battle to optimize your database, constant tweaking configuration, etc.

I think MongoDB is pretty good for the Q&A site. Q&A sites don't have an overly complicated business logic, no need to complex relational joins in queries.

At the time I started this project there were no other php/mongodb based Q&A sites.



Sunday, March 11, 2012

My answer to "How can i use the api??"

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


More about the API
There is a page that allows a developer to register their app and to get an API key.
Some api methods require an api key and you as admin can also set a daily limit of api requests, this limit is per app. Also admin may be able to disable an access to the api based on the api key.

You can provide a link to register the APP at the /viewapps/ url
If user does not have any apps registered, they are redirected to a page to create their first app.

You can try it here:
http://support.lampcms.com/viewapps/

Once a client has a unique API key, they should add it to api call, like this:
&apikey=theirkey

For POST methods a client must pass apikey as a post parameter

API also supports basic authentication where username and password of actual site user maybe passed in headers - this is based on the HTTP basic authentication RFC.

You are strongly advised to use https ONLY for such requests as username and password will be send over the network in clear text.

Saturday, March 10, 2012

My answer to "I can translate string in file stored on style?"

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


You cannot use $this inside any templates. Templates are static classes.
You need to pass already translated strings to template as variables.

My answer to "How can i use the api??"

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


For example, for this question:
support.lampcms.com/api/api.php?a=question&qid=1540

For all questions:
support.lampcms.com/api/api.php?a=questions

All questions but also include comments
support.lampcms.com/api/api.php?a=questions&comments=true

All questions that contain tags "feature" and "request"
support.lampcms.com/api/api.php?a=questions&comments=true&tags=feature%20request

This is just a simple example. There are other features in api, I'll post more about them soon.