Yii Framework Forum: Yii Core CMS - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii Core CMS Attempt to create a code base for my own Yii apps Rate Topic: -----

#1 User is offline   dinhtrung 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 23-May 11
  • Location:Hanoi, Vietnam

Posted 20 July 2011 - 10:58 AM

After move from CI to Yii, lots of API reading, I found myself quite familiar with Yii by now. So I managed to port my CI code to Yii framework. And so here is the result. Comments and suggestions are welcome. Please, point my mistakes, and sorry for my bad English. :-p

You can clone the Hg repo at:
Yii Core CMS repo at bitbucket

### Core module ###
* Settings: I use the class CMS Setting to store all app settings.
* BaseController: Define some extra attributes for CController, to be used through out the web app. Heavily taken from Drupal. Like: $this->page, $this->pageTitle, $this->siteName, $this->siteLogo, $this->siteSlogan (cause Yii use camelCase :P)
* WebTheme: manage site themes. I learnt Drupal once, so I think its .ini file is quite useful to define different info, like Theme name, description and especially region system. In the application.themes folder, there are 2 themes converted. One from classic theme, and other from Yii themes. Some feature are implement: List available themes, Configure theme settings, and Preview the theme with dummy contents on every region.
* Category and WebMenu: Use Yii Ext ENestedSet behavior to build Tree structure categorize system. To think of it, I really like the Drupal entity system. So in the main content, I have the setting for one content type to choose which Category Tree it should use to categorize its content. After all, it's just a list of Category Name, right?
* Node: The main content, serves as an example of using Tags, Category and CKEditor with CKFinder.
* BlockType and Block: The basic block system. Each block type has many blocks, and blocks can be put in theme regions. To define the block, you can specify the callback and component of each block type, then a viewfile for it to render. Some block type are only to dynamic load a view file. Some other are more complex: it has 2 callback, with the same prefix, one for configure the block, the other for provide the viewfile with data.

Also, there is a Node module that provide some more example of how to extends the content type:
* NodeImage and NodeDocument: Use FileImageBehaviors to add file attachment and images.
* NodeFile: Use MultimodelForm to add multiple files upload, with title and desc for each file.
* NodeComment: Use Yii Ext ECommentable behaviors to add comment support.

ALso, there are some Action in the ext.actions, that can be used to provide some more CRUD features on the future. All of them are extends from CViewAction, so if you put the view in $_GET, you'll see the magic...
That's it for now.
Take a look, and let me know if there's bugs or something I should tweak.
1

#2 User is offline   yancho 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 14-December 10

Posted 23 July 2011 - 05:17 AM

Yii + Drupal sounds very intersting. I realy like Yii and also in past used Drupal for some time and loved some concepts. So lets take a look ;)
0

#3 User is offline   vision 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 14-May 11
  • Location:Berlin / Germany

Posted 02 August 2011 - 01:37 AM

Hi, as i know a good Block System comes from Xoops. I never worked with drupal. But i download ur code for a look today. The idea for a good ground app for a further dev is good.
0

#4 User is offline   dinhtrung 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 23-May 11
  • Location:Hanoi, Vietnam

Posted 02 August 2011 - 04:16 AM

First app running with Yii Core CMS:

BBBArt Hoa Kho

The project goes on... I found many bugs, especially related to i18n and translation. But it quite stable by now.
0

#5 User is offline   rabol 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 50
  • Joined: 08-October 08

Posted 07 August 2011 - 02:26 AM

Hi

A read me would be nice.

I managed to get up and running (development configuration), but It's possible to login.

Do you plan to make a official release that can be used 'easy' and if yes, when ?

Kind regards
Steen
0

#6 User is offline   dinhtrung 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 23-May 11
  • Location:Hanoi, Vietnam

Posted 07 August 2011 - 10:56 PM

@rabol: Please try with the webapp configuration. It should run upon the sqlite database at application.data directory. I wrote some articles about development with Yii Core CMS on it.

At this time, my writing skill is not so good, so I think document the system should quite hard for me. :P

It is quite easy to use right now, but I really don't like the way menu is being declared manually. I will think of some way to attach menu to node.

Also, I'll wrote an example module to show how to extends some core Model to build various content types.
0

#7 User is offline   rabol 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 50
  • Joined: 08-October 08

Posted 08 August 2011 - 01:42 AM

Hi

Changing to webapp configuration did not change anything, I still get 404 error when I click the login link.

Just a small advice, if you want anybody to use or help you develop your CMS you have to:
1) Provide minimum steps to make the application work
2) do not hardcode host names
3) Use a language the 'all' understand e.g do not use vi in Western part of the world - There is not so many people that understand Vietnamese :)

Trust me, I know how hard it is to write a CMS - I did www.pradoportal.dk, using the PRADO framework.

I'll give your CMS another try
0

#8 User is offline   dinhtrung 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 23-May 11
  • Location:Hanoi, Vietnam

Posted 09 August 2011 - 10:45 PM

Thanks rabol for your suggestion.
I'll make a branch out of tip, for Vietnamese, and convert current docs and articles to English if possible.
For now, the system is kind of work.
I'll gradually tune up and add caching.
Also, make a demo module that using core to create various content types.
0

#9 User is offline   dinhtrung 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 23-May 11
  • Location:Hanoi, Vietnam

Posted 14 August 2011 - 04:12 AM

One demo site:
Yii Core CMS on ByetHost

Account:
* User: admin
* Pass: admin

Enjoy!
0

#10 User is offline   sctech 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 17-August 11

Posted 18 August 2011 - 12:10 AM

I am a Drupal developer and am exploring this framework for a project that I think will be too active for Drupal to manage without many changes to most of the modules that would be needed. Drupal is a nice solution for what is was intended for. Now it seems that Drupal and Wordpress are trying to compete for the same audience. Drupal 7 seems to be cleaner than Drupal 6 with CCK in core, but it still has the same block issues. Unless you use the Context module or the more powerful Panels module, the block system is difficult to manage.

Most graphic artists/designers are totally lost in Drupal and I can say that learning to develop in it was like climbing the face of a cliff. There is no consistency in what little documentation is available and many modules are a crap shoot as to if they will work or are poorly written. My biggest peeve is that very few people actually use the proper terms for concepts and actions.

I still use it, still like it ok, but would love a better solution.

I would like to get rid of all of the stupid forms that need to be filled out. Click, click then click some more.

The area that Drupal is sucking wind on is the end user control panel. It really doesn't have one that is even close to what Wordpress offers.

Back to something constructive. It would be nice to accomplish what Wordpress and Drupal try to without all of the hooks and training wheels most of their audience requires. We need a mean and lean platform that can be passed off to a reasonably trained designer to style. I really don't think that most end clients open up the Drupal environment and make code changes. Drupal must spend at least 40% of its effort to allow that flexibility.

Why is what your doing going to be any better than Drupal 7? The Drupal platform is hundreds of thousands of hours ahead of you. Why reinvent the wheel?

Sorry if I sound negative. I am not meaning to. I think that you might be on to something if it solves the existing Drupal problems in a cost effective way.
0

#11 User is offline   dinhtrung 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 23-May 11
  • Location:Hanoi, Vietnam

Posted 19 August 2011 - 02:50 PM

@sctech: Yep, you are correct.

Quote

Why is what your doing going to be any better than Drupal 7? The Drupal platform is hundreds of thousands of hours ahead of you. Why reinvent the wheel?


I just want to take some of drupal, that I think it is neccessary, and easily to adapt them to other projects of mine own.
Development new features from Drupal is way too much complicate for me. I looked at the example module of drupal. Only for some basic CRUD operations, and it makes me mad already. I knew Drupal has alot of flexible code, and alot of code too. Huge modules, contributions, etc.

But for some sort of small projects, Yii more fits.

I just try to write a code base to re-use through out my projects, that's all. I don't think it will bloat up to something as advanced and complex as Drupal, really.

Also, it's some way of experience the power of Yii.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users