Sample FW/1 and DI/1 application

1,204 views
Skip to first unread message

Simon Bingham

unread,
May 2, 2012, 12:08:18 PM5/2/12
to framew...@googlegroups.com
I thought group members might be interested to learn that I released a CFML content management system last week that uses FW/1 and DI/1. You'll find the project on GitHub.

This is my first open source project so it would be great to get some feedback and contributions from other FW/1 users. I hope the application will also be helpful to those wanting to learn FW/1.

Apologies for the shameless plug! ;)

Phil Cruz

unread,
May 2, 2012, 12:12:27 PM5/2/12
to framew...@googlegroups.com
Cool. Is there a site/demo of this where we can check it out. 

-Phil

--
FW/1 on RIAForge: http://fw1.riaforge.org/
 
FW/1 on github: http://github.com/seancorfield/fw1
 
FW/1 on Google Groups: http://groups.google.com/group/framework-one

Matt Quackenbush

unread,
May 2, 2012, 12:18:57 PM5/2/12
to framew...@googlegroups.com
Simon,

A friend and I stumbled upon your project last week (I think the day it came out?). I have forked it, and intend to give it a thorough going through as soon as possible. I/we will provide feedback when we've had a chance to play with it.

From one OSS author/contributor to another: Thanks for putting it out there! :-)

Simon Bingham

unread,
May 2, 2012, 12:24:33 PM5/2/12
to framew...@googlegroups.com
Hi Phil. That's a good point. Will put it on my todo list. Until then you'll just have to download it. ;) 

Simon Bingham

unread,
May 2, 2012, 2:48:16 PM5/2/12
to framew...@googlegroups.com
Thanks Matt. I look forward to your feedback.

Sean Corfield

unread,
May 3, 2012, 1:20:22 AM5/3/12
to framew...@googlegroups.com
Thank you for sharing this Simon!

Once I dig myself out from under the giant data migration and site
launches we've been going thru at World Singles, I'll try to spend
some serious time looking at this!

Sean

On Wed, May 2, 2012 at 9:08 AM, Simon Bingham <m...@simonbingham.me.uk> wrote:

Brandon

unread,
May 3, 2012, 1:21:32 AM5/3/12
to framew...@googlegroups.com
Thank you! I'm planning to use FW1 on my next project, this is a perfect kickstart and it's exactly what I'm looking for! I'll give it a go and send feedbacks.

Brandon P.

Richard Tugwell

unread,
May 3, 2012, 1:49:02 AM5/3/12
to framew...@googlegroups.com
Thanks for sharing Simon - I downloaded and ran the app, and it runs,
but I haven't had time to explore it much.

I see you provided a setup script with DDL for MySQL. I've removed the
DDL, and allowed ORM to create the tables itself. I used H2 Database,
on Railo 3.3.1, and marked the modified setup.sql as the
ORM.sqlscript. Of course you need to fiddle with the ORM.dbcreate
setting, but one of the big advantages with ORM (I think) is the
potential to make your application DB neutral. (There are some caveats
to this of course, but in general I think it's a good thing)

NB There's some duplicate code in setupApplication - validateThis instantiation

I'll try and give you some more feedback once I've had a closer look

Cheers

Richard
> --
> FW/1 on RIAForge: http://fw1.riaforge.org/
>
> FW/1 on github: http://github.com/seancorfield/fw1
>
> FW/1 on Google Groups: http://groups.google.com/group/framework-one



--
=================================
Richard Tugwell
http://blog.richardtugwell.com
r.tu...@forthmedia.com

Richard Tugwell

unread,
May 3, 2012, 2:11:47 AM5/3/12
to framew...@googlegroups.com
.. might also want to look at how relative links are handled to make
it portable - eg for assets such as JS/CSS - the current setup won't
find these files when the application is running in a specific context
root

Simon Bingham

unread,
May 3, 2012, 4:53:43 AM5/3/12
to framew...@googlegroups.com
Thanks for your feedback Richard. As suggested I've removed the DDL from the SQL setup script so ColdFusion now creates the database tables and the SQL script simply adds some initial records (https://github.com/simonbingham/xindi/blob/develop/_setup/setup.sql).

I've also amended the dbcreate setting in the Application.cfc file so, if a development environment is detected, the SQL setup script is run. However, I found that the setup script was being called for subsequent page requests so I have amended the code so the setup script is only run if a 'rebuild' parameter is found in the url. There maybe a better solution, but this seems to work.

if( this.development && !isNull( url.rebuild ) )
{
this.ormsettings.dbcreate = "dropcreate";
this.ormsettings.sqlscript = "_setup/setup.sql";
}

Simon Bingham

unread,
May 3, 2012, 5:00:20 AM5/3/12
to framew...@googlegroups.com
Any chance you could suggest a solution for this issue Richard? Thanks for you help. :)

Richard Tugwell

unread,
May 3, 2012, 5:06:21 AM5/3/12
to framew...@googlegroups.com
Well I don't think you want to always run drop/create in development. Unless you have an easy way of restoring your hard-earned test data!

==========================
Richard Tugwell

Richard Tugwell

unread,
May 3, 2012, 5:10:00 AM5/3/12
to framew...@googlegroups.com
I tend to avoid relative paths for these sort of assets, but I guess there are more experienced folk on the list who may have other solutions.


==========================
Richard Tugwell

AJ Mercer

unread,
May 7, 2012, 7:30:59 AM5/7/12
to framew...@googlegroups.com
For Railo express (Jetty) I had to add the following to etc\webdefault.xml

  <servlet-mapping>
    <servlet-name>CFMLServlet</servlet-name>
         ...
<url-pattern>/xindi/index.cfm/*</url-pattern>


It would seem that multiple wild cards is still not working in Jetty
    <url-pattern>*.cfm/*</url-pattern>



--

Simon Bingham

unread,
May 7, 2012, 1:59:33 PM5/7/12
to framew...@googlegroups.com
Thanks for the feedback. I'll update the installation instructions.

AJ Mercer

unread,
May 7, 2012, 6:25:45 PM5/7/12
to framew...@googlegroups.com
I have not been able to run the site as yet, so you may want to hold off for a while.

In admin, I can add pages, but in the site I am not seeing the navigation being built.

How do you manually flush the cache?

Matt Quackenbush

unread,
May 7, 2012, 6:38:59 PM5/7/12
to framew...@googlegroups.com
I am experiencing this same behavior. The site map is never updated; it only shows 'Site Map'. Additionally, if I load the home page first, it is always displayed, no matter what the URL is. Conversely, if I load the site map first, it is always displayed, no matter what the URL is. That is, until a Tomcat restart.

NB: I have altered the GlobalEventHandler in order to run on Railo, but I rather doubt that has anything to do with the behavior I'm seeing (and apparently AJ is seeing - on ACF?).

Thanks!

AJ Mercer

unread,
May 7, 2012, 6:46:55 PM5/7/12
to framew...@googlegroups.com
I am on Railo Express (jetty)

I am running with friendly URLS turned off, but that does not seem to have helped
    generateSES = false

I have forked the project in GitHub.
From the website, does anyone know how I can get updates simonbingham/xindi?

Maybe I cant do anything as there have not been any updates in the last couple of days??

Matt Quackenbush

unread,
May 7, 2012, 6:59:40 PM5/7/12
to framew...@googlegroups.com

Sean Corfield

unread,
May 7, 2012, 7:06:42 PM5/7/12
to framew...@googlegroups.com
Add Simon's original repo as a remote to your fork - typically you
call it 'upstream':

git remote add upstream git://github.com/simonbingham/xindi.git

Then you can pull/merge any changes Simon makes like this:

git pull upstream master

(where 'upstream' is the remote name and 'master' is the branch)

Then push his merged changes into your master repo:

git push

(make sure your repo is up to date before doing this - by at least
committing your own changes)

BTW, this is all very clearly documented on the github website:
http://help.github.com/fork-a-repo/

Sean

AJ Mercer

unread,
May 7, 2012, 7:11:30 PM5/7/12
to framew...@googlegroups.com
Thanks Sean & Matt.

I will read up on this.


Simon Bingham

unread,
May 8, 2012, 4:43:03 AM5/8/12
to framew...@googlegroups.com
I've been able to replicate the issue with the page requests not working in Railo, but haven't figured out what is causing it. Will take another look later.
Twitter: simonbingham 


Simon Bingham

unread,
May 8, 2012, 6:23:26 AM5/8/12
to framew...@googlegroups.com
The latest version of Xindi should now work on Railo. Let me know if you have any further problems though. g...@github.com:simonbingham/xindi.git

AJ Mercer

unread,
May 8, 2012, 7:47:44 AM5/8/12
to framew...@googlegroups.com
That did the trick for me :-)

Thank you.

Matt Quackenbush

unread,
May 8, 2012, 11:05:48 AM5/8/12
to framew...@googlegroups.com
Dittos. Pages actually load now, and things show up in the site map. YAY!

Thanks, Simon. :-)

Jim Priest

unread,
Jun 26, 2012, 3:02:39 PM6/26/12
to framew...@googlegroups.com
Simon - I'm digging through the Xindi app - working on my first 'big' FW/1 app and trying to come up with ideas :) 

I like how you have the admin and public subsystems - but not sure why you have the two assets directories?  

/assets 
/admin/assets

I haven't setup the app yet locally to get it running - just poking through code... 

I also like you login / security redirect but am curious why you didn't use the before() method?

Thanks for the example!  

Jim 

Simon Bingham

unread,
Jun 27, 2012, 4:43:46 AM6/27/12
to framew...@googlegroups.com
Jim - thanks for reviewing the code and for your questions.

My thinking is that, although developers using Xindi will want to apply a custom design to the front end, they shouldn't need to change the design of the admin. Therefore, I think keeping the two assets directories separate makes sense. I think the subsystems also become more portable if they contain their associated assets. If you look at the 'develop' branch of Xindi (https://github.com/simonbingham/xindi/tree/develop) you'll notice that I have now moved the assets directory (containing the assets for the public subsystem) that was in the project root to the public directory.

I think you're right about using the before() method for the security redirect so I have implemented your suggestion (https://github.com/simonbingham/xindi/blob/develop/admin/controllers/main.cfc).

Thanks for your input.

Jim Priest

unread,
Jun 27, 2012, 7:13:58 AM6/27/12
to framew...@googlegroups.com
Thanks for the explanation.

I think it'll be more clear with the /assets under the public and
admin folder regarding your intentions of having independent designs.

I'll checkout your revised security today!

Jim

Chanh Ong

unread,
Dec 23, 2016, 2:04:46 PM12/23/16
to framework-one
What if I don't want to use "enable search engine safe", can Xindi run without it?  Thanks

Simon Bingham

unread,
Dec 27, 2016, 2:51:36 PM12/27/16
to framework-one
Yes, I think it will.

--
FW/1 documentation: http://framework-one.github.io
FW/1 source code: http://github.com/framework-one/fw1
FW/1 chat / support: https://gitter.im/framework-one/fw1
FW/1 mailing list: http://groups.google.com/group/framework-one
---
You received this message because you are subscribed to a topic in the Google Groups "framework-one" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/framework-one/963dCewFS3Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to framework-on...@googlegroups.com.
Visit this group at https://groups.google.com/group/framework-one.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages