Yii Framework Forum: Yii For A Cms That Generates Html Files (No Php, No Cached) - Yii Framework Forum

Jump to content

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

Yii For A Cms That Generates Html Files (No Php, No Cached) Yii not involved at all in the public site, just plain html files Rate Topic: -----

#1 User is offline   CarFir 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 06-February 13
  • Location:Florence, Tuscany, Italy

Posted 07 February 2013 - 11:10 AM

I have searched the web and this forum but I have not found an answer, so I will post here. I am a total newbie to Yii while I used PHP to code sites for years.
I have a web site project that needs an ordinary CMS with PHP and MySQL, but it must generate static Html files for the public web site. I do mean simple html files, not a cache file served by PHP. There must be no calls to the php engine for the http requests regarding the front-end.
I know it sounds like --hem no, it really is!-- a silly newbie's question and I truly apologize for that, but I don't know where to start with doing that with Yii.
Last year I have done a similar PHP project without using a framework, but as I would like the new project to be able to expand if needed and keep the code clean and structured, I am evaluating if Yii could be the right instrument to implement it or I am just wasting my time because it's too complex for what I have to do.

Summary:
- CMS (PHP + DB) writing/overwriting .html files on public site.
- no DB or PHP requests on public site, just plain files served by Apache (not served by a Yii application).

Do you know if exists any tutorial or script I should look at to learn coding it?
0

#2 User is offline   guaruja 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 68
  • Joined: 10-March 12

Posted 08 February 2013 - 06:08 AM

View PostCarFir, on 07 February 2013 - 11:10 AM, said:

I have searched the web and this forum but I have not found an answer, so I will post here. I am a total newbie to Yii while I used PHP to code sites for years.
I have a web site project that needs an ordinary CMS with PHP and MySQL, but it must generate static Html files for the public web site. I do mean simple html files, not a cache file served by PHP. There must be no calls to the php engine for the http requests regarding the front-end.
I know it sounds like --hem no, it really is!-- a silly newbie's question and I truly apologize for that, but I don't know where to start with doing that with Yii.
Last year I have done a similar PHP project without using a framework, but as I would like the new project to be able to expand if needed and keep the code clean and structured, I am evaluating if Yii could be the right instrument to implement it or I am just wasting my time because it's too complex for what I have to do.

Summary:
- CMS (PHP + DB) writing/overwriting .html files on public site.
- no DB or PHP requests on public site, just plain files served by Apache (not served by a Yii application).

Do you know if exists any tutorial or script I should look at to learn coding it?


Hi, why reinvent the wheel?

there are open source cms (frameworks) that have a static export functionality built in, like TYPO3

Quote

High-performance setups will want to make use of load-balancing and use the staging/static HTML-export capability of TYPO3. Check for the static file setup in the mailing list archives and in the installation script to get started.

0

#3 User is offline   CarFir 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 06-February 13
  • Location:Florence, Tuscany, Italy

Posted 08 February 2013 - 06:36 AM

View Postguaruja, on 08 February 2013 - 06:08 AM, said:

Hi, why reinvent the wheel?

there are open source cms (frameworks) that have a static export functionality built in, like TYPO3


Thanks for your help.
I tried Typo3 12 years ago and it was a nightmare, far too much complicated. I don't know if things are changed and know it's easier to learn and manage. I have checked the requirements (256 Mb RAM) and I hope it does not apply to the static HTML set-up, because I don't have.
I thought of a framework because of flexibility, I would just implement things I need. And I need two back-ends, one for the administrator and the other, very simplified, for people managing their content (text and images).
I will check TYPO3 again, do you know other reliable CMSs that produce static pages?

Learning a framework should be useful also to other projects, because I always code them myself and I need a structured path to follow (otherwise I produce a messy code only me understands).
0

#4 User is offline   slp 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 30-April 11

Posted 08 February 2013 - 09:22 AM

Hi, i'm trying the same thing right now. I have been using Yii for a while now, and learned, that is capable of allmost anything.
So i came here by searching if someone actualy already did this.
I was thinking about some php output buffering.
I did think about the use of typo3, because from former projects i know it throws all the non dynamic pages into one folder for optimized speed of frontend. but typo3 is way to resource hungry to just set it up for html creation. also many hosters dont comply the resource needs.

So maybe we can find a simple solution here, maybe something we can push to a module or so for other users.
From the whole rendering process of yii i know that it must be pushing the different parts into a buffer allready. so maybe the function where it actualy starts printing out the buffer to the browser can be overwritten to instead write a file to a "statics" folder.
I will have a look at the frameworks sources later, but maybe someone who knows where to do this can help by filling in the blanks :)

FYI im doing this because a client has a low level hosting wit 20MB space, no PHP, no DB, just one Domain there. So i try to have the framework with all the content generation and setup on one server i own, but that isnt on the public internet and then on change of any of the static html files trigger a ftp push to the live server.
0

#5 User is offline   CarFir 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 06-February 13
  • Location:Florence, Tuscany, Italy

Posted 08 February 2013 - 11:59 AM

I am investigating :-). The proper name is static publishing, that's the one Movable Type has always done (generating pages as .html files. It seems that SilverStripe framework - doc.silverstripe.org/framework/en/reference/staticpublisher - does it, if I understand correctly that page.

View Postslp, on 08 February 2013 - 09:22 AM, said:

then on change of any of the static html files trigger a ftp push to the live server.

Could a remote CMS solve your problems? I am referring to CushyCMS, Unify, Pagelime, Surreal and similar.
0

#6 User is offline   slp 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 30-April 11

Posted 12 February 2013 - 05:47 AM

View PostCarFir, on 08 February 2013 - 11:59 AM, said:

Could a remote CMS solve your problems? I am referring to CushyCMS, Unify, Pagelime, Surreal and similar.


Wow, never heard of those, thats exactly what i was thinking of, but actualy i need to host the "CMS" on my server, so my interest in finding a way to do this via Yii is still the same :)
But with such a module one could possibly try building a similar CMS as a service site ...
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