2

I am curious if anyone can explain how does Cushy CMS implement its features. What I am referring to is adding a class in html , like <div class="cms-editable"></div> and automatically make that div editable and save contents to database. Do they use a parser and write the file? I do not think they save the data to the database.

John
  • 15,990
  • 10
  • 70
  • 110
Mythriel
  • 1,360
  • 5
  • 24
  • 45
  • It's a hosted service. If they don't reveal this part, then it's hard to know without asking someone who works on the project (and then they might not tell you). – John Mar 13 '12 at 18:24
  • anyway my question was how to create a service similar to what they have..how to create something where you want to make things editable with just adding classes to html...parser and write to file? or is there a better design? – Mythriel Mar 13 '12 at 20:40
  • @Mythriel you should do it feed-based rather than FTP-based. FTP sucks a fat one. Imagine non-technical people editing your PHP pages. Ouch. Oh sorry, I put a accidentally. Oops. – King Friday Mar 13 '12 at 23:18
  • @John your comment is silly if you are a real web developer. Its obvious to anyone that can work for Google or Microsoft of how this is built. – King Friday Mar 13 '12 at 23:23
  • @kitgui The OP's comment above indicated what I thought he asked: specific implementation. You explained what it does, which is clear. Cushy CMS doesn't show *how* it does what it does, and that's what I was getting at. – John Mar 16 '12 at 21:28
  • @John Do you mean I need to write the code for you? Each server-side framework has its own code to glean from in terms of built-in libraries. There are ones for FTP, ones for parsing HTML, etc etc. I did explain HOW but not at the level you are asking. Its not important beyond what I explained as none of these things are particularly difficult to implement. – King Friday Mar 16 '12 at 21:41
  • @John my comments are too harsh in my language. Please excuse this. You are doing fine. I'm a bit passionate about this subject. – King Friday Mar 16 '12 at 22:11
  • @kitgui I guess my observation was more that you don't know what's going on to the extent that you know what's going on in a fresh install of, say, Wordpress, because you don't have access to the source. If we did, then we could ask the OP to point to the code that s/he doesn't understand. That was all. :) – John Mar 17 '12 at 07:13

1 Answers1

2

Cushy is FTP-based, meaning it works directly on your file structure. When you view your website after logging into Cushy's website it is this website interface that pulls in the page you are editing on and inspects the places where the class file exists and makes this an editable item. It uses the FTP credentials you have entered to make the call via FTP protocol to pull in your website pages. It also parses the dom and checks for the class name "cms-editable" and makes this content editable through an HTML editor after some configuration steps after installation. When you make changes and save them, it directly modifies the content area that you defined as editable via FTP again. There are many tools in any server-side language to accomplish this for FTP protocol and DOM parsing.

The Good thing about Cushy CMS

  • It works for static websites so easily, a designer could set it up.

The Bad thing about Cushy CMS

  • Its terrible for dynamic websites as your clients are directly editing on your pages and will easily break the website with accidental syntax errors. It does not fit for MVC-style and web programming in general.
  • It requires too much administration after setup as you have to first set an item to be editable on your file directly, then you must give permission through its interface. Imagine doing this for a templated pages being reused. Basically you can't.
  • It cannot handle the same file being edited in different parts at the same time by different users because its actually just a source file being edited upon. Here is where overwrites become an issue when someone saves something thinking they are only saving the part they edited, not realizing they just saved the entire document.

To give background to my answer, I wrote a CMS tool that is cloud-based and built in a completely different manner than Cushy because its for developers as FTP is a huge limitation when a feed-based approach is much more appropriate. Also, having to log into another website to edit your stuff just sucks. In fact, why even have a back office at all when you have HTML5 client-side editing capabilities and postMessage for cross-domain communication? My profile has more details on this approach.

King Friday
  • 25,132
  • 12
  • 90
  • 84
  • wow thank you for this comment ..this is the kind of thing I was looking for...i built a CMS for a couple of clients, MVC + OOP and most of my clients are designers and some of them want even easier to use systems and I was looking to redesign my CMS. Another option I was thinking of was making the CMS's backend on the front site, and relying mostly on JS and Ajax calls to insert and update content. I was thinking of using backbone.js with php as the server language. – Mythriel Mar 14 '12 at 08:53
  • anyway I checked kitgui and I think it is really a cool thing...that is the kind of cms I want to build for my designer clients..really awsome and easy to use – Mythriel Mar 14 '12 at 08:55
  • If you need more advice or just want to bounce ideas off each other, feel free to contact me. I worked at some of the highest organizations as a dev and now am rolling my own thing. We could be of use to each other coming up with new ideas. My profile has my contact. – King Friday Mar 14 '12 at 21:26