Solved

ColdFusion Single Page Application Architecture Design

Posted on 2004-08-07
23
893 Views
Last Modified: 2013-12-20
Hello Experts,
I have to develop a single page database driven application for my company. I have previously developed them before. Though, I was thinking it is good to ask other experts opinion. Following are things, which I want to implement.
1) Application driven by single page something like index.cfm .
      Pages/forms should be submitted to this page or master switch in this page
2) Navigation controlled through database.
      Database should be regulating the navigation bar.
3) Implementing CFC’s.
      Different categorization of the CFC ( logic, display, moducles)
4) Depth of the navigation.
      Level one, two, three, four, five level deep navigation

Well, this was my idea, I was thinking if there are tutorial, and ideas from you experts which can help me to prepare good ideas before Monday will be helpful. Any good suggestions online regarding architecture of single page application are appreciated. If you help me to guide in more in above four areas or add fifth area, please feel free to write it to me.
I will accordingly divide the points between good suggestions.
Regards and Thanks,
---Pinal
0
Comment
Question by:pinaldave
  • 7
  • 4
  • 4
  • +4
23 Comments
 
LVL 12

Expert Comment

by:jyokum
ID: 11744334
As far as architecture, i'd recommend Fusebox (http://www.fusebox.org) or Mach II (http://www.mach-ii.com). Either one will give you the "single page" you are looking for and the ability to use a MVC design.

You'd have to build your own database driven navigation but that's not that hard to do.

You can find sample apps on both sites.
0
 
LVL 21

Author Comment

by:pinaldave
ID: 11744390
Hi jyokum,

thank you very much for your idea. I will look into it. Though my team does not want to switch to fusebox the reason is previous unpleasent experience. I am sorry as I forgot to mentioned in my previoius post. Thank you for your suggestion. Though if you or other experts can explain any of points from previous message will be great help.

Regards,
---Pinal
0
 
LVL 12

Expert Comment

by:jyokum
ID: 11744783
if you're just looking for a CMS, you should check out FarCry (http://farcry.daemon.com.au/)
0
 
LVL 1

Expert Comment

by:jay252
ID: 11745415
Have a read over coldfusion best practices at http://www.benorama.com/coldfusion/ and there is a good breeze presentation titled MX applications based on MVC at http://www.cf-europe.org/preso/bhediard/168409/index.html

Both contain tons of great information to help you get started.
0
 
LVL 21

Author Comment

by:pinaldave
ID: 11745494
Hi jay252,

thank you for the links. They are very interesting. I have bookmarked them. They do answer one part of my question what should be the organization.
I have to make decision on Monday so I keep this question open till then. I also want to know something about navigation sturcture which is database driven. Again thanks for great links!

Regards,
---Pinal
0
 
LVL 5

Expert Comment

by:Seth_Bienek
ID: 11746713

Just a note, Mach-II is what Macromedia is currently using to develop their internal apps, so I would definitely consider that an endorsement, especially if you are looking for an MVC model that leverages the benefits of CFC's.

I'd post the link, but jyokum beat me to it.

Regards,

Seth
0
 
LVL 1

Assisted Solution

by:jay252
jay252 earned 100 total points
ID: 11747088
Hey Pinal, glad the links were useful. I’m not sure what you have in mind for your navigation but I have an idea for you. I recently built a small knowledge base wiki and found that the problem with most wikis are they are hard to navigate. To solve the problem I assign all my pages which get stored in a  database a parent page. When I render a page I then select all records from the database which have the current page as their parent and create a link to all the child pages.

What you could do to build your database driven navigation structure is to create a table with 2 columns pageID and parentID. When you build the navigation bar or whatever you plan on using create a link to all pages which have a parentID of the current page's pageID.

Hope this makes sense and helps out. If not give me an idea of the application you will be building.

Thanks, Jay
0
 
LVL 9

Expert Comment

by:Jerry_Pang
ID: 11749482
im using coldfusion with fusebox. 2nd vote for www.fusebox.org

>>1) Application driven by single page something like index.cfm .

defenitely fusebox.
i'd recommend fusebox
0
 
LVL 21

Author Comment

by:pinaldave
ID: 11749629
Hello Jerry_pang,
thank you for your vote. Though, as mentioned before, I do not want to go for fusebox.
Those who use fusebox, I respect your opinion. Fusebox may be the best. Though, I do not want to go for the best and want to select something which is lower the best.
I do not want to use fusebox is the final answer so please advise accordingly.
With Regards,
---Pinal
0
 
LVL 12

Expert Comment

by:jyokum
ID: 11749812
Mach II
0
 
LVL 9

Expert Comment

by:Jerry_Pang
ID: 11750225
oh i see. sorry

same experiences here.
Im using fusebox, but my team does not want to use it nor they plan to use it.
they prefere the traditional spagetti coding style.

im still searching for other frameworks for coldfusion.

i'll be listening to this thread.
jerry
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 11751847
If you are looking for something that uses CFCs and is probably the closest thing to OO in CF check out Mach II. If you have not been to www.halhelms.com I recomend taking a look, he's one of the developers of Mach II.
0
 
LVL 2

Expert Comment

by:russmichaels
ID: 11757905
I personally hate fusebox, it promotes bad code by bad developers who are just blindly following the methology.
I own a hosting and development company and we have constant problems from people who use fusebox and do not understand it and blame us for the problems.
I have been a programmer for a long time and have developed my own methodology and application framework, so I usually frown on others.
But I do like Mach-II and may start using it myself, so I second those recommendations.

The main thing to consider with a framework is to make it simple, do not over complicate it.
What I will say about fusebox is look at it and take the good bits and leave the crap alone.

All you need to do is modularise your code so that each section is independant.
E.G.
Seperate each Module of your site into it's own folder and name the folder afte rthe module
so you would have folders called USERS, PRODUCTS, NEWS, EVENTS etc.
And you index takes a parameter that defines which module to use.

E.G.
index.cfm?action=products

In each modules folder you have a control file that deal with the action to perform and any required permissions.
So lets say in each folder you have a file called Action.cfm, in this file you take another attribute from the URL and include the appropriate file.

Lets say your URL is index.cfm?action=products.view

You treat the value of action as a list with the DOT as the dleimiter, the first item in the list is the module, the 2nd is the actual action.

Your your index.cfm would include the action.cfm file from the products folder.
This action.cfm will then have a switch/case statement for each possile action.
It will then include the appropriate file where the action=view, say viewproducts.cfm

HTH

Russ Michaels
0
 
LVL 21

Author Comment

by:pinaldave
ID: 11758652
Thank you Russ.
Thank you everybody for this wonderful suggestions. I will finalize this questions tomorrow. Well, except fusebox and Mach II if there is any more suggestions as I am sure our team wouldl like to code something then implementing other tools like Mach II or FuseBox. Any other architect suggestions are greatly appriciated.
Regards,
---Pinal
0
 
LVL 12

Expert Comment

by:jyokum
ID: 11759254
pinaldave,
this comment isn't really for you but for the others making comments on Fusebox.

I feel I have to defend a great framework that's getting bashed here. There's nothing wrong with Fusebox and it certainly doesn't promote bad code. In fact, it does just the opposite... it promotes modularity and code reuse, eases maintenance, and countless other benefits. Problems in fusebox apps are not the result of fusebox, they are the result of inadequately trained developers.

I teach Fusebox to developers all the time and the following seems to hold true:
- those that learned to program in other languages first (Java, C, Visual Basic, etc.) and then moved to CF love it and do well with it.
- those that started in HTML and then moved to CF hate it and have a hard time accepting it.

My point to this is not to try to convince anyone to use Fusebox.. it's your code.. use whatever methodology you are comfortable with. It's just unfair to judge the Fusebox methodology based on developers that implement it poorly.

And Russ... "index.cfm?action=products.view"
The method you are describing sounds a lot like Fusebox.
0
 
LVL 21

Author Comment

by:pinaldave
ID: 11759353
Thank you very much jyokum for this great information. I really apriciate it. Though, again, I was thinking this if we can keep Fusebox out of my questions it would be really great.
Though, I want other options and opinion. That is the only reason I have kept this thread open. I will really and heartly apriciate it if fusebox topic is not further pursued on this thread.
I already have accpeted in the beginning that fusebox is great technology, secondly I have said again and again that I do not want any opinion/vote for this topic in this thread as I am really looking for help other then that option. This option I will be not able to use so why to invest time. If others who want to make any decision can go to other places to find answer.
Here, I am struggling and trying to get real answer which I can use. Please help me with not posting any more comments for fusebox.

Again, NO FUSEBOX please.

Regards,
---Pinal
0
 
LVL 2

Accepted Solution

by:
russmichaels earned 200 total points
ID: 11760712
jyokum .
That is of course your opinion.
If you read my comments, it is not my opinion, it is my realworld experience from running a successful coldfusion development and hosting company. So i am not saying I THINK fusebox promotes bad coding and lack of understanding, I am telling you it is a fact. Almost every single one of our clients who uses Fusebox doesn't understand their own code, produces bad code that causes problems and comes to us when things break, and we have to fix it.
Sorry but you cannot argue with facts and evidence just because you like fusebox.

Yes the way my own framework works is similar to the way fusebox4 works, but I wrote mine long before Fusebox4 existed. But mine is much simpler, more modular, easier to understand, is not bloated with useless code and of all the developers I have tauight it to, it has improved their coding skills, and taught them about frameworks, unlike fusebox.

Anyway this is no help to Pinal, who has stated he is not interested in Fusebox, so perhaps you need to take this topic to a forum or something. I would suggest you come and join my coldfusion forums and discussion lists at www.cfdeveloper.co.uk.

Pinal... If you would like some personal tuition on developing methodologies and frameworks rather than using an existing one, let me know, perhaps we can arrange something.
There are plenty of other methodologies out there that are nothing to do with ColdFusion.
Try here.
http://dmoz.org/Computers/Programming/Methodologies/

Regards

Russ Michaels
Macromedia Certified Coldfusion Professional
0
 
LVL 9

Assisted Solution

by:Jerry_Pang
Jerry_Pang earned 200 total points
ID: 11760972
2 frameworks i found if your interested. i have no idea what these frameworks ar. dont know if these are good frameworks.

smartobjects
http://www.smart-objects.com/
EMF2
http://www.cfoop.com/project.cfm?view=EMF


i think i remember there was blackbox, similar to fusebox, dunno where it is now.
There was also an MVC framework for coldfusion, i dont know what happen to them now too.
I could not find them.

Anyways, both fusebox and machII (sorry again) are excellent to use with MVC approach.

Since you or your team dont like fusebox then i would recommend
to use an MVC approach to your coding style.

MVC approach is widely use on any languange. You or your team may agree on
how to create your next project. Who knows, you could make your own
framework.

regards,
jerry
0
 
LVL 9

Expert Comment

by:Jerry_Pang
ID: 11761091
back to your post
>1) Application driven by single page something like index.cfm .
>     Pages/forms should be submitted to this page or master switch in this page

Make an agreement with your team to use an Model-view-controller approach.
Use Index.cfm as a Main Controller, then create a separate mini controllers for the other modules.

Make an agreement also to separate Views/display pages with Actions/logic pages. implement CFC's for logic codes for reuse. Well, its up to you and your team how you will make this work.

>2) Navigation controlled through database.
>     Database should be regulating the navigation bar.

Id recommend to use a "heap approach" (i think thats whats its called, correct me if im wrong).
This is what i use to my one of my projects
TABLE Navigation
NavID - integer autonumber (primary KEY)
Title  
ParentID - foreign key to NavID

sample
NavID, Title, ParentID
0       ROOT            NULL
1       HOME             0
2       ABOUTUS             1
3       CONTACTUS       1
4      HELP            0
5      PORTFOLIO      0
6      FEEDBACK            4
7      FAQ            4

then add a delete cascade trigger

>3) Implementing CFC’s.
>     Different categorization of the CFC ( logic, display, moducles)

Recommend to separate the display pages with the login pages.
Create a folder name
Controller\
Model\
Views\

or if you like
Logic\
Actions\
Display\


>4) Depth of the navigation.
>     Level one, two, three, four, five level deep navigation

Same recommendation on #2

0
 
LVL 2

Expert Comment

by:russmichaels
ID: 11761428
This is really just using different words to repeat what has already been said.
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 11761966
I thought the FB discussion and framework discussion was just getting good. If you want to continue it I made a post to alt.comp.lang.coldfusion continue it there :)
0
 
LVL 21

Author Comment

by:pinaldave
ID: 11763369
Thank you very much Russ, This is what I was expecting as answer and suggestion.
Jerry, thank you thank you for this amazing explaination. I think both of you guys do have suggested me great help. Jay has provided me excellent links which is beyond the scope of this question but has helped me to solve other issues. I will close this question here. Though, I got more help then I was looking for so I will post additional points for you. I will split the points.
I am ColdFusion Programmer and have master degree in Computer Programming. The whole purpose of this questions was to help me design which is stable system. I do not want to miss any design concept which I am not aware of. I will contact all of you guys again, if I need more help.
This questions is closed now and I have got very good help. I will post extra points as I have got extra help in another Q. Due to EE policy all the Q are suppose to be of 500 points they can not go beyond them. I think, I am helped more then what I asked so I will post more points.
Have a good day and Regards,
---Pinal
0
 
LVL 21

Author Comment

by:pinaldave
ID: 11763414
Russ and Jerry Please post your comments http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_21088418.html
for extra points.
Thank you everybody for your help.
---Pinal
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now