Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-03-19 02:04:49

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

[contrib] Textpattern on Rails

I had a quick flick through some of the posts, a lot of talk about deficiencies in textpattern.com website, stale codebase etc. I didn’t have much time to read all the posts, but there seems to be a lot of TXP frustration that has been building up, xpattern.net is one way of addressing this, I have another suggestion.

This might sound all crazy, but what about re-building Textpattern around the best of breed such as git, Ruby/Rails + rspec, all under Agile?

For the past year, I’ve been working with these technologies day in and day out, I see them being applied in all the wrong ways because of business constraints. When I take 2h in the evening/night from family or sleep time, I want to make that time count. Working with code that doesn’t have tests, working with PHP that cannot deal with proper OO or ancient technologies such as SVN or mod_php is not my idea of fun. Taking the best practices from what I do daily and applying them on a potentially exciting project such as Textpattern is definitely closer to my idea of “coding pron”.

So, I’m asking you all, do you honestly believe that you are ready for a Ruby/Rails version of Textpattern that would keep as much from the old functionality as possible, but with the following in the core:

  • tags
  • caching
  • article versioning
  • custom fields across all data types (articles, images, files etc.)
  • contact form
  • admin theme support
  • proper plugin support with update functionality for all plugins
  • patches by different developers pulled directly from their TXP forks (as well as painless custom implementations)
  • multi-site support (this might make it into TXP 4.0.9 actually)
  • templates (e-commerce, blog, photoblog etc.) – the database would be set up accordingly

I don’t see myself doing all this on my own – it’s more than 1 person can handle – and I’m not the 100% guy, I do 80% of the work in 20% of the time and then move on, come back as and when.

I have been sitting on this idea since I’ve released my glz_custom_fields plugin, always realizing that there is so much more that TXP could become. I kept saying to myself one day, one fine day, but it hasn’t happened in a year now, without making it public, bouncing some ideas off, see if there is even a remote interest in this, it’s very likely that this will fade away like most ideas do.

So, what’s your take?

Offline

#2 2009-03-19 02:36:14

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [contrib] Textpattern on Rails

Yes please to the features. I suppose I could be talked into RoR…

But I’m no help, I’m pixel-pusher and not a smart-boy.

Last edited by mrdale (2009-03-19 02:45:05)

Offline

#3 2009-03-19 02:50:17

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: [contrib] Textpattern on Rails

Dale, if you go Rails, you’ll never go back, trust me on this one. It’s no longer FCGI hell but serene, Passenger + git + Capistrano heaven. I kept going wrong with the whole setup for the past 12 months+, have seen most of the pitfalls, including large, multi-server, multi-db clustered environments, it’s nice-to-have experience to say the least.

There will be plenty of stuff to do. Forum, documentation, general housekeeping, it’s the most basic tasks that people disregard but that actually are the most vital ones.

You have no idea how easy it would be to implement most of the features I mentioned in Rails. There are plugins/gems for most of the stuff, other bits are being built as we speak, Rails/github community is awesome!

Offline

#4 2009-03-19 03:08:16

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: [contrib] Textpattern on Rails

So are you considering a new CMS based on TXP ideals built on RoR? It would be interesting to see something like that. I’m still pretty fresh with Rails apps (both in developing and deploying), but if its as simple to use as TXP and has the same level of performance it’d be useful.

Offline

#5 2009-03-19 03:42:46

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: [contrib] Textpattern on Rails

No Amit, I am considering porting Textpattern to RoR and adding all the extra features that have been requested for years now.

The CMS would be the same, there would even be the same vanilla look (with other customizable themes for the admin, of course). I won’t change the way Textpattern works or the core principles, just the implementation. Plugins will still play the most important role for extending the core functionality, but more useful stuff such as tagging & unlimited, custom fields will be part of the core. I’m still not sure whether to make the contact form functionality part of the main codebase. I think that plugins are more appropriate for this kind of thing. I want to keep the core as slim as possible.

I would also like to replace the core tag parser with ERB syntax. What are your thoughts on this:

<%= article(:limit => 20, :form => "some_form_name") %>

instead of the current

<txp:article limit="20" form="some_form_name" />

Offline

#6 2009-03-19 04:59:59

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: [contrib] Textpattern on Rails

gerhard wrote:

I didn’t have much time to read all the posts, but there seems to be a lot of TXP frustration that has been building up, xpattern.net is one way of addressing this, I have another suggestion.

The frustration was never about the language chosen to code Textpattern, it was the low number of core developers and the high number of plugin writers wanting to contribute more. There’s nothing wrong with PHP, most people who leave Textpattern move to Expression Engine, Drupal or Wordpress.

In the 3 plus years that I’ve followed Textpattern, a lot of talented, enthusiastic and friendly people have vacated the premises. Some have issued farewell posts, some have vanished into the tubes, never to be heard from again. One can only imagine where Textpattern would be today if someone would of taken charge and started to delegate.

My opinion is that the PHP code is solid, rather than code anew in RoR, fork it. Fork it for multi-site usage, call it TxPMU. Fork it for admin theme capabilities, call it TxPADM. Make another fork so the common man has theme capabilities, call it TxPSkins. And keep forking it every time a good idea comes about, cause it’s the GNU way of doing things.

And when one of these forks catches fire, like the Debian inspired Ubuntu did, then we’ll have a txp:new_home.

Offline

#7 2009-03-19 13:21:14

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: [contrib] Textpattern on Rails

gerhard wrote:

I would also like to replace the core tag parser with ERB syntax. What are your thoughts on this:

<%= article(:limit => 20, :form => "some_form_name") %>

instead of the current

<txp:article limit="20" form="some_form_name" />

I suppose there must be some programming advantage to [1] porting to rails and [2] dropping the simplicity of XML-like tags.

But from a designer’s point of view, those are two reasons I would not use such a CMS.

Last edited by reid (2009-03-19 13:21:38)


TextPattern user since 04/04/04

Offline

#8 2009-03-19 13:25:19

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,416
Website GitHub Mastodon

Re: [contrib] Textpattern on Rails

gerhard wrote:

I would also like to replace the core tag parser with ERB syntax. What are your thoughts on this: <%= article(:limit => 20, :form => "some_form_name") %>

Looks a lot like the PHP equivalent <?= article(array('limit' => '20', 'form' => 'some_form_name')) ?> which we had to use if we wouldn’t have Txp tags.

Offline

#9 2009-03-19 15:00:35

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [contrib] Textpattern on Rails

Yep gerhard, sorry, but I like xml-esque tags. Is there a functional reason why you’d change the format?

Offline

#10 2009-03-19 16:08:39

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

Re: [contrib] Textpattern on Rails

I’d never change the xml-ish tag-format.
I can’t even think of something that is that comprehensible for normal people (who possibly want to start working with textpattern for themselves, and have a clear, clean, general format/language with the current format).
I regard this as one of the centrepieces of txp’s good and fine character.
(Even if I sometimes glance at Rails thinking of it’s potential benefits: this code lets me look away at once and be happy with textpattern as it is – which I’m anyway :-)

Last edited by saccade (2009-03-19 16:12:12)

Offline

#11 2009-03-19 16:19:48

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: [contrib] Textpattern on Rails

gerhard wrote:

I would also like to replace the core tag parser with ERB syntax.

You might want to check out Radius for something similar to TXP tags.

Offline

#12 2009-03-19 17:12:26

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: [contrib] Textpattern on Rails

gerhard wrote:

This might sound all crazy, but what about re-building Textpattern around the best of breed such as git, Ruby/Rails + rspec, all under Agile?

My day job is all RoR, which btw is the main problem with getting my plugins finished – I find it hard to going back and forth between ruby and php. But the new gbp_permanent_links in heavily inspired from RoR. It does have a lot to offer… interesting idea. maybe.

Offline

#13 2009-03-19 21:22:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: [contrib] Textpattern on Rails

gerhard wrote:

Working with code that doesn’t have tests

Tests shmests :-) That’s for proper programmers who care about coupling, cohesion, and putting assertions in their code! I kinda like PHP for its nebulousness. That’s not to say I wouldn’t love Rails (if I understood it) but PHP is more what-you-see-is-sometimes-what-you-get, which is a close approximation to a programming language in my mind. I’m a hacker not a coder; hell, if I was a coder the world would have way more bad code than there is out there already.

I would also like to replace the core tag parser with ERB syntax

It sounds like you spend a lot of time in the corporate world (just guessing, since you love Capistrano and other productivity tools) and want a grown up, corporate CMS to the point it has an uber-efficient programmer-style syntax for its tags. As Bert says, fork away! Luckily (for me) I escaped the corporate world when I realised that if I didn’t write code to meet the deadline or didn’t put piece of Paper A into slot B in a timely fashion the world would keep on turning. But I can see how people who are still in that environment would crave a more streamlined engine to TXP so it can do more stuff better, with more terse code.

Like a few others who have posted, I’m glad TXP is not that. You can say that it’s resistance to change if you like, but — even as a programmer of sorts — I consider the XML syntax simpler for non-geeks to comprehend. And TXP is primarily for designers (they outnumber us code monkeys by a hefty margin, and where would TXP be if it was only for people with a programmy mindset?)

Of course, because I occasionally have a hankering for code-like tags, I’ve done my best to bring the ‘programming’ style of tags to the masses with my plugins. For those that want the extra 20% of grunt from their sites, it gives that power and flexibility while (sort of) retaining the TXP feel. For the majority that don’t, ignorance is the best medicine; if I may mix my metaphors.

BTW, would a new engine stop all current plugins working, or can Rails interpret PHP too? Sorry if it seems a naive question. I’ve looked at Rails a couple of times and have just failed to grasp MVC. I feel so stupid, but it just doesn’t ‘click’; perhaps because all the examples I’ve seen so far are so bloody abstract that I can’t see any real-world use for them :-)

I got OO; it seemed logical and made sense to model and encapsulate real-world objects in code (hehe, then I wrote Java for a while and the novelty soon wore off because of the poxy API!) MVC sounds like it should be the answer to everyone’s coding prayers but — call me Mr Thick Thicky Thickety-Thick— I just don’t get it.

I guess what I’m trying to say is that Rails might well be the future, but I’m quite happy with my comfy, albeit unwashed, PHP blanky. Come the revolution I’ll probably eventually grasp Rails (and Perl too, one day!) and then look back, bleary-eyed and wonder how I ever managed with PHP, in the same way I can’t believe I spent years writing web sites by hand before I found TXP. It seems you’ve reached that stage and desire more; go for it. A Rails TXP would no doubt rock. And I might even be able to learn from it and understand this Rails stuff when I see it in a real environment that I can relate to. But please leave this TXPPHP warts and all — for those less fortunate than yourself.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#14 2009-03-19 21:59:55

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Re: [contrib] Textpattern on Rails

What about Python/Django?

Offline

#15 2009-03-20 01:04:10

TheEric
Plugin Author
From: Colorado & Montana.
Registered: 2004-09-17
Posts: 603
Website

Re: [contrib] Textpattern on Rails

I just gotta say. I hate RoR. I’ve tried it, and absolutely loathe it.

For those wanting features? Hire a plugin developer or wait for the xPattern beta.

Offline

Board footer

Powered by FluxBB