2

I have to develop frontend/backend application using cakephp.

can you give me advice how should i develop them, using same cakephp library?

or I have to develop them using separate cakephp libraries?

1
  • 2
    I don't think it is possible to answer this question - it is way too broad. I suggest you head over to the CakePHP website and take a look at the sample applications and tutorials offered there.
    – Pekka
    Jun 2, 2010 at 13:20

4 Answers 4

3

I am confused - cakePHP would be used to implement both.

PHP would be used to implement the server-side backend. The same "project" would also contain HTML, JS, CSS, etc that will be used to render the front-end within the browser. Any PHP "views" will also execute code on the back-end, although any HTML output will be rendered on the frontend.

Does that help at all? Or am I missing something?

2

If by frontend/backend, you mean an application with a user interface (frontend) and an administration interface (backend), then you want to refer to the Prefix Routing section of the manual. This will allow you to have separate flow and interfaces (controller/view) for each type of user while sharing the same data (models).

If by frontend/backend, you mean an application (frontend) that communicates with another server application (backend) using web services, then you want to look at the Additional Class Paths section of the manual. This will allow you to share common classes with two (or more) separate applications.

Note: the above links are for CakePHP 3.x, though these features have existed in one form or another since v1.2.

0
1

Not quite sure if I understood you correct, but if I did:

You can set up multiple projects using the same cake-core files. The core files don't even need to be placed in the webroot folder..

http://book.cakephp.org/view/35/Advanced-Installation

1

For your own sanity, you should regard the backend management as part of the same project as the frontend.

The systems I have built generally use view-type methods for the public view and crud-type methods for the admin view. How you lock down the admin is your choice. Personally I don't like the default admin prefix way. I use login and ACL - Mark Story's tutorial on http://book.cakephp.org/ is superb. With that you can password protect methods.

CakePHP is very flexible and extensible and you can make the administration as simple or as flexible as you like.

4
  • Also see Mark Story's blog: mark-story.com/posts/view/…
    – Leo
    Jun 3, 2010 at 9:47
  • i was not so clear with my question... for frontend, i would like to have ulr like: myapp.com, and for backend myapp.com/admin do i need to have separate cakephp libraries, or i can use same for both?
    – user198003
    Jun 3, 2010 at 10:03
  • In that case look at book.cakephp.org/view/544/Prefix-Routing which will do just that, although you can also achieve what you want using routes.php or .htaccess or both.
    – Leo
    Jun 3, 2010 at 13:37
  • 1
    "do i need to have separate cakephp libraries, or i can use same for both?" No. You just need one CakePHP installation, i.e. one cake directory and, of course, you'll use the same database.
    – Leo
    Jun 4, 2010 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.