Related to MVC framework(struts)

Hi all
Friends i am having a small application which i had developed in servlets and jsp ... The problem is comming when i have to implement in struts..
means I am having
1>> 15 Servlet classes
2>>10 Jsp's
3>>7 UserServices class (BussinessLogic class)
4>>3 bean class (for getter and setter methods)
In this MVC framework the problem is comming at the time when i have
to implement all the above points in the MVC framework
please help
Thanks all

Hi,
MVC stands for
M ---- Model (Business Logic, FormBeans, Database Related)
V ---- View (JSP, HTML etc..)
C ---- Controller (Servlet)
This is how you have to use MVC Framework.

Similar Messages

  • Ann: North East Conference on MVC Frameworks and Struts in 3 weeks:

    Ann: North East Conference on MVC Frameworks and Struts in 3 weeks:
    Most people already know what MVC is, once you know what it is, here is the next step. Presenting will be the popular frameworks and components in use by 8 speakers:
    -Ted Husted – Author – Struts Chains/2.0 – the dominant framework in use, from Ziff Davis, to Apple Store to most large commercial sites.
    Husted.com
    -Rod Johnson – Author – EJB/Spring
    springFrameWork.com
    -Christophe Coenraets – Flex-MacroMedia - “back to rich UI w/SOA” (Great blog entry on Struts + Flex)
    markMe.com/cc
    -Howard Lewis Ship – Author – HiveMind (SOA, IOC, AOP) – commonly referred to as “the next big thing”
    javaTapestry.blogspot.com
    -Clinton Begin – DAO/iBatis/SQLMaps – the best DAO layer
    imo, used by Spring, jPetStore, basicPortal, etc.
    -Matt Raible – Author – displayTag/strutsMenu – (displayTag is my favorite J2EE component)
    Raibledesigns.com
    -Jason Carreira – WebWork 2
    freeroller.net/page/jCarreira
    - Vic Cekvenich – Author – basicPortal (J2EZ – easy and simple to customize application for membership, portal, cms, community, store, etc. using bestPractices for large, profitable commercial sites. )
    + more
    You will get a CD mailed to you once you register.
    April 3rd from 8AM to 7PM in NYC at nyhotel.com, next to MSG. Advertised in JDJ, NY Times, etc. My guess is that you won’t find half as many good sessions at Sun’s Java One.
    It $99 to register now at baseBeans.com, in a few day's price keeps going up.

    Hey Jan,
    Oracle's E-Business suite is moving to a JSF solution. This is really for three main reasons (abbreviated version):
    1) JSF is much more focused on the 'view' components. The component model has a clean separation of the component definition from its rendering. This, among many other things, allows us to provide a consistent development environment and APIs for developers building apps for browsers, mobile devices, telnet devices, etc.
    2) JSF has a better defined lifecycle. The JSF lifecycle maps much closer to the phases that enterprise applications need when processing data from a web application. We are able to easily extend this to add things not currently in the spec, like portlets, wireless, etc., as well as more easily plug new components into the framework.
    3) Once you remove the JSP tags & FormBean from Struts, all you are left with is the navigation. There is nothing special in the Struts navigation that would cause us to try to make the two technologies work together. In fact, the Faces navigation will not be robust enough in its current form to support the declarative navigation requirements for Oracle apps. We plan to extend the JSF navigation and then work to submit that back into the standards.
    Hope this helps,
    Ted Farrell
    Oracle Corporation.

  • MVC Framework - Spring or Struts

    I was just curious what your opinions where as to what MVC framework to go with? Or does it depend on what you are trying to accomplish?

    SACHINLINUX wrote:
    Can you please elaborate where all these framework stand. No, you'll have to figure something out yourself.
    Means if a new bie want to switch Switch? If you're a newbie you're still learning how to stop making a mess. Where does switching come in?
    from simple MVC(JSP SERVLET AND BEANS ) to higher technology,What would you consider "higher technology"?
    which one is the best for him.Best for you to learn how to ask a proper question.
    Reply will be appreciated Thanks!Smarter questions would be appreciated.
    %

  • Query related to OA framework.

    HI all,
    I have one query related to OA framework.
    Query : I have one business requirement to add/update one choice fields on receivables page and base on user input’s I have to add this choice in sql query and want to display result that is controller .( As of now everything is there only I want to add one more choice on page ).
    So I am looking for solution what to do . As I am new in OA framework.
    First of all I want to pull out all files and want to check /modify on my user desktop once it will work normal then I will start modify .
    So for that what I have to do (I have to pull out all files from server ) . ?
    Thanks in advance,
    Raj

    Raj,
    I have already replied that you will find the details for setup in some of the old threads. Its always better to look into old threads for generic issues. If you have got any specific OAF issue, ppl are always here to help you.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Comparisons on Flex MVC Frameworks

    Hi,
    I have been doing a comparison Cairngorm, Swiz, Mate, and PureMVC. I plan on presenting my analysis to the developers at my company and my blog. Before I do so, I want to reach out to the maintainers of each project for comments. I feel offering to do so would be the more fair thing to do.
    However, I'm not sure what's the best way to send my analysis and example applications to the maintainers of this project. I feel that posting my analysis on this forum is inappropriate at this time. What would be the best way to get in touch with the maintainers of the Cairngorm project?

    Thank you for your quick reply, Alex. Since my post yesterday, I came across quite a few comprisons (not an exhaustive list of what I had to read through...):
    http://www.insideria.com/2008/12/frameworkquest-2008-introducti.html
    http://stackoverflow.com/questions/37043/flex-mvc-frameworks
    http://www.flexpasta.com/index.php/2009/07/16/mate-framework-should-it-be-the-new-standard -in-flex-4/
    http://www.summa-tech.com/blog/2009/01/14/selecting-the-right-flex-application-framework/
    http://www.summa-tech.com/blog/2009/02/27/the-flex-application-frameworks-smackdown-sorta/
    http://www.adobe.com/devnet/flex/articles/flex_framework.html
    http://tv.adobe.com/watch/360flex-conference/mate-flex-framework-by-laura-arguello/
    Because I'm looking for a non-intrusive (or loosely coupled) framework with a gentle learning curve (so that my company's current Oracle Forms developers won't immediately reject it), I'm tempted to try out Mate. And because the framework doesn't interfere with views, business logic and server access, it seems that I'll more easily be able to back out and try another one if I find out I made a mistake (something that's tougher to do with Cairngorm or PureMVC).

  • Deployment and configuration of MVC framework

    Guys,
    I have a scenario where I need to deploy one of PHP MVC framework and use Oracle 10g web forms back end queries .
    Have anyone done anything similar ? Appreciate if you people give me some ideas considering me as a new bee to oracle 10g forms .
    Thanks
    Rahulazm
    Edited by: user1091112 on Nov 25, 2009 11:10 PM

    There's a framework here for MVC generically, how you're going to craft them into the forms ... well that's a thought. I'm not sure how that might be done. My generic guess is: You'll have to generate the web form and then write your own integration script or manually integrate the code.

  • MVC Framework

    Hi, We're working with the MVC Framework. The personnel application is running very good. But when we try to create our own application and have a problem. We use Rational Rose to generate the service xml file and it works good when we use standard process, like CreateJSPPAge, ProcessRouter, DisplayGroup, etc, all that comes in the cle package. But the problem is when developing a persisting process that is not in the satandard process, like the GetDepartment in the personnel example. Orion throws the following error when accessing the controller:
    "XML-0108: (Fatal Error) Start of root element expected"
    We are creating process with the process generation tool. ?Does anyone one have an idea that can help me to find this problem?
    Thanks
    Alex

    Sure!
    Here's a snippet of the xml file where the error comes from.
    The problem is in the "inicio" process group. If I comment the process "sitiocontenidos" it works fine, but if I try to use it, I got the exception error.
    <?xml version="1.0" standalone="yes"?>
    <!-- NOTE! Adjust the following path to match your server installation... -->
    <!DOCTYPE service SYSTEM "file:///c:/mvc/src/dtd/cle-service.dtd"[
    <!ENTITY docpath "">
    <!ENTITY jsppath "/">
    <!ENTITY xmlrulespath "file:///c:/oracle/9ias/j2ee/home/applications/personal/web/">
    ]>
    <service name="TGCSite" class="oracle.cle.process.Service" initial="tgcsiterouter">
    <process name="tgcsiterouter" class="oracle.clex.process.ProcessRouter" end="false">
    <argument type="Integer" value="7"/>
    <argument type="Boolean" value="false"/>
    <argument type="String" value="tc1"/>
    <infoalias local="pp1" global="index"/>
    <infoalias local="pp2" global="servicios"/>
    <infoalias local="pp3" global="consultoria"/>
    <infoalias local="pp4" global="capacitacion"/>
    <infoalias local="pp5" global="productos"/>
    <infoalias local="pp6" global="otros"/>
    <infoalias local="pp7" global="proyectos"/>
    </process>
    <processgroup name="inicio" class="oracle.cle.process.DisplayGroup" end="true" initial="sitiocontenidos">
    <process name="iniciorouter" class="oracle.clex.process.ProcessRouter" end="false">
    <argument type="Integer" value="1"/>
    <argument type="Boolean" value="true"/>
    <argument type="String" value="success"/>
    <infoalias local="pp1" global="index"/>
    </process>
    <process name="paginainicio" class="oracle.clex.process.CreateJSPPage" end="true">
    <argument type="String" value="index.jsp"/>
    </process>
    <process name="paginaerror" class="oracle.clex.process.CreateJSPPage" end="true">
    <argument type="String" value="paginaError.jsp"/>
    </process>
    <process name="sitiocontenidos" class="tgc.site.process.GetSitioContenidos" end="false">
    </process>
    <transition src="iniciorouter" condition="tc1" dest="paginainicio"/>
    <transition src="iniciorouter" condition="success" dest="paginainicio"/>
    <transition src="iniciorouter" condition="failure" dest="paginaerror"/>
    <transition src="getsitiocontenidos" condition="success" dest="iniciorouter"/>
    <transition src="getsitiocontenidos" condition="failure" dest="iniciorouter"/>
    </processgroup>
    Another process groups...
    <transition src="tgcsiterouter" condition="tc1" dest="inicio"/>
    <transition src="tgcsiterouter" condition="tc2" dest="servicios"/>
    <transition src="tgcsiterouter" condition="failure" dest="inicio"/>
    <transition src="tgcsiterouter" condition="tc3" dest="servicios"/>
    <transition src="tgcsiterouter" condition="tc4" dest="servicios"/>
    <transition src="tgcsiterouter" condition="tc5" dest="productos"/>
    <transition src="tgcsiterouter" condition="tc7" dest="proyectos"/>
    <transition src="tgcsiterouter" condition="tc6" dest="productos"/>
    <grouptransition srcgroup="inicio" srcprocess="paginainicio" dest="tgcsiterouter"/>
    <grouptransition srcgroup="inicio" srcprocess="paginaerror" dest="tgcsiterouter"/>
    <grouptransition srcgroup="servicios" srcprocess="paginaservicios" dest="tgcsiterouter"/>
    <grouptransition srcgroup="servicios" srcprocess="paginaconsultoria" dest="tgcsiterouter"/>
    <grouptransition srcgroup="servicios" srcprocess="paginacapacitacion" dest="tgcsiterouter"/>
    <grouptransition srcgroup="servicios" srcprocess="paginaerror" dest="tgcsiterouter"/>
    <grouptransition srcgroup="productos" srcprocess="paginaproductos" dest="tgcsiterouter"/>
    <grouptransition srcgroup="productos" srcprocess="paginaotros" dest="tgcsiterouter"/>
    <grouptransition srcgroup="proyectos" srcprocess="paginaproyectos" dest="tgcsiterouter"/>
    </service>
    Hope this help. Thanks
    Alex

  • J2EE MVC模式JSF与Struts的异同

    J2EE MVC模式JSF与Struts的异同
    Struts和JSF/Tapestry都属于表现层框架,这两种分属不同性质的框架,后者是一种事件驱动型的组件模型,而Struts只是单纯的MVC模式框架,老外总是急吼吼说事件驱动型就比MVC模式框架好,何以见得,我们下面进行详细分析比较一下到底是怎么回事?
      首先事件是指从客户端页面(浏览器)由用户操作触发的事件,Struts使用Action来接受浏览器表单提交的事件,这里使用了Command模式,每个继承Action的子类都必须实现一个方法execute。
      在struts中,实际是一个表单Form对应一个Action类(或DispatchAction),换一句话说:在Struts中实际是一个表单只能对应一个事件,struts这种事件方式称为application event,application event和component event相比是一种粗粒度的事件。
      struts重要的表单对象ActionForm是一种对象,它代表了一种应用,这个对象中至少包含几个字段,这些字段是Jsp页面表单中的input字段,因为一个表单对应一个事件,所以,当我们需要将事件粒度细化到表单中这些字段时,也就是说,一个字段对应一个事件时,单纯使用Struts就不太可能,当然通过结合JavaScript也是可以转弯实现的。
      而这种情况使用JSF就可以方便实现,
    <h:inputText id="userId" value="#{login.userId}">
      <f:valueChangeListener type="logindemo.UserLoginChanged" />
    </h:inputText>
      #{login.userId}表示从名为login的JavaBean的getUserId获得的结果,这个功能使用struts也可以实现,name="login" property="userId"
      关键是第二行,这里表示如果userId的值改变并且确定提交后,将触发调用类UserLoginChanged的processValueChanged(...)方法。
      JSF可以为组件提供两种事件:Value Changed和 Action. 前者我们已经在上节见识过用处,后者就相当于struts中表单提交Action机制,它的JSF写法如下:
    <h:commandButton id="login" commandName="login">
      <f:actionListener type=”logindemo.LoginActionListener” />
    </h:commandButton>
      从代码可以看出,这两种事件是通过Listerner这样观察者模式贴在具体组件字段上的,而Struts此类事件是原始的一种表单提交Submit触发机制。如果说前者比较语言化(编程语言习惯做法类似Swing编程);后者是属于WEB化,因为它是来自Html表单,如果你起步是从Perl/PHP开始,反而容易接受Struts这种风格。
      基本配置
      Struts和JSF都是一种框架,JSF必须需要两种包JSF核心包、JSTL包(标签库),此外,JSF还将使用到Apache项目的一些commons包,这些Apache包只要部署在你的服务器中既可。
      JSF包下载地址:http://java.sun.com/j2ee/javaserverfaces/download.html选择其中Reference Implementation。
      JSTL包下载在http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
      所以,从JSF的驱动包组成看,其开源基因也占据很大的比重,JSF是一个SUN伙伴们工业标准和开源之间的一个混血儿。
      上述两个地址下载的jar合并在一起就是JSF所需要的全部驱动包了。与Struts的驱动包一样,这些驱动包必须位于Web项目的WEB-INF/lib,和Struts一样的是也必须在web.xml中有如下配置:
    <web-app>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
    </web-app>
      这里和Struts的web.xml配置何其相似,简直一模一样。
      正如Struts的struts-config.xml一样,JSF也有类似的faces-config.xml配置文件:
    <faces-config>
      <navigation-rule>
        <from-view-id>/index.jsp</from-view-id>
        <navigation-case>
          <from-outcome>login</from-outcome>
          <to-view-id>/welcome.jsp</to-view-id>
        </navigation-case>
      </navigation-rule>
      <managed-bean>
        <managed-bean-name>user</managed-bean-name>
        <managed-bean-class>com.corejsf.UserBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    </faces-config>
      在Struts-config.xml中有ActionForm Action以及Jsp之间的流程关系,在faces-config.xml中,也有这样的流程,我们具体解释一下Navigation:
      在index.jsp中有一个事件:
    <h:commandButton label="Login" action="login" />
      action的值必须匹配form-outcome值,上述Navigation配置表示:如果在index.jsp中有一个login事件,那么事件触发后下一个页面将是welcome.jsp
      JSF有一个独立的事件发生和页面导航的流程安排,这个思路比struts要非常清晰。
      managed-bean类似Struts的ActionForm,正如可以在struts-config.xml中定义ActionForm的scope一样,这里也定义了managed-bean的scope为session。
      但是如果你只以为JSF的managed-bean就这点功能就错了,JSF融入了新的Ioc模式/依赖性注射等技术。
    Ioc模式
      对于Userbean这样一个managed-bean,其代码如下:
    public class UserBean {
      private String name;
      private String password;
      // PROPERTY: name
      public String getName() { return name; }
      public void setName(String newValue) { name = newValue; }
      // PROPERTY: password
      public String getPassword() { return password; }
      public void setPassword(String newValue) { password = newValue; }
    <managed-bean>
      <managed-bean-name>user</managed-bean-name>
      <managed-bean-class>com.corejsf.UserBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
        <property-name>name</property-name>
        <value>me</value>
      </managed-property>
      <managed-property>
        <property-name>password</property-name>
        <value>secret</value>
      </managed-property>
    </managed-bean>
      faces-config.xml这段配置其实是将"me"赋值给name,将secret赋值给password,这是采取Ioc模式中的Setter注射方式。
      Backing Beans
      对于一个web form,我们可以使用一个bean包含其涉及的所有组件,这个bean就称为Backing Bean, Backing Bean的优点是:一个单个类可以封装相关一系列功能的数据和逻辑。
      说白了,就是一个Javabean里包含其他Javabean,互相调用,属于Facade模式或Adapter模式。
      对于一个Backing Beans来说,其中包含了几个managed-bean,managed-bean一定是有scope的,那么这其中的几个managed-beans如何配置它们的scope呢?
    <managed-bean>
      <managed-property>
        <property-name>visit</property-name>
        <value>#{sessionScope.visit}</value>
      </managed-property>
      这里配置了一个Backing Beans中有一个setVisit方法,将这个visit赋值为session中的visit,这样以后在程序中我们只管访问visit对象,从中获取我们希望的数据(如用户登陆注册信息),而visit是保存在session还是application或request只需要配置既可。
      UI界面
      JSF和Struts一样,除了JavaBeans类之外,还有页面表现元素,都是是使用标签完成的,Struts也提供了struts-faces.tld标签库向JSF过渡。
      使用Struts标签库编程复杂页面时,一个最大问题是会大量使用logic标签,这个logic如同if语句,一旦写起来,搞的JSP页面象俄罗斯方块一样,但是使用JSF标签就简洁优美:
    <jia:navigatorItem name="inbox" label="InBox"
      icon="/images/inbox.gif"
      action="inbox"
      disabled="#{!authenticationBean.inboxAuthorized}"/>
      如果authenticationBean中inboxAuthorized返回是假,那么这一行标签就不用显示,多干净利索!
      先写到这里,我会继续对JSF深入比较下去,如果研究过Jdon框架的人,可能会发现,Jdon框架的jdonframework.xml中service配置和managed-bean一样都使用了依赖注射,看来对Javabean的依赖注射已经迅速地成为一种新技术象征,如果你还不了解Ioc模式,赶紧补课。

    JSF在很大程度上类似Struts,而不是类似Tapestry,可以说是一种Struts 2.0,都是采取标签库+组件的形式,只是JSF的组件概念没有象Struts那样必须继承ActionForm的限制;JSF在事件粒度上要细腻,不象Struts那样,一个表单一个事件,JSF可以细化到表单中的每个字段上。
      JSF只有在组件和事件机制这个概念上类似Tapestry,但是不似Tapestry那样是一个完全组件的框架,所以,如果你做一个对页面要求灵活度相当高的系统,选用Tapestry是第一考虑。
      Struts/JSF则适合在一般的数据页面录入的系统中,对于Struts和JSF的选用,我目前个人观点是:如果你是一个新的系统,可以直接从JSF开始;如果你已经使用Struts,不必转换,如果需要切换,可以将JSF和Tapestry一起考虑。
      另外,JSF/Tapestry不只是支持Html,也支持多种客户端语言如WML或XUI等。
      这三者之间关系:如果说Struts是左派;那Tapestry则是右派;而JSF则是中间派,中庸主义是SUN联盟的一贯策略。

  • Please Help For the Spring MVC Framework

    Someone please give me some file that represent the example of implementation of Spring MVC Framework.

    User,
    I read your post and had one word pop to mind: "huh?"
    Perhaps [url http://catb.org/~esr/faqs/smart-questions.html]this and [url http://www.oracle.com/technology/products/jdev/howtos/1013/SpringwithJDev/index.html]this will be helpful to you.
    John

  • Mvc framework and stored procedures ?

    Is it possible to keep high productivity of the mvc framework and still use stored procedures as with Cocobase, Castor,etc?
    Thank you in advance.

    If your question is, "Can the Business Components for Java J2EE Framework easily use stored procedures as datasources?"
    The answer is yes. See the sample that we ship in the .\BC4J\samples\StoredProc directory.
    If you're meaning the Oracle9i MVC Framework for J2EE which is produced by Oracle Consulting, then it's best to ask the question the "Project Cleveland" forum here on the OTN forum.
    thanks.

  • Regarding RESTful WEB SERVICES with SPRING MVC Framework

    Hi,
    Can anyone explain me about RESTful WEB SERVICES with SPRING MVC Framework .
    It is urgent for me.
    Thanks
    Venkat Jalli

    Hi Manoj,
    I am also new to Spring MVC portlet. But, I tried to see the difference between sample spring portlet and your code below. Issue that I can see is, in your code, you have not mapped your servlet container with portlet application. So, in theory, your servlet containder do not know that you have a servlet. Let me try to explain from sample portlet,
    In portlet.xml, they have something like below:-
    <portlet-name>swf-booking-mvc</portlet-name>
    <display-name>Spring Webflow Booking MVC</display-name>
    <portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
    And in web.xml, they have below:-
    <servlet-name>swf-booking-mvc</servlet-name>
    <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
    <init-param>
    <param-name>portlet-name</param-name>
    <param-value>swf-booking-mvc</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    This web.xml is for Pluto portlet container and there will something similar for Weblogic portal as well that I am trying to figure out :(
    Thanks,
    Sanjeev

  • Should I use a MVC framework for an large RIA application

    The book of "Adobe Flex 3 Training from the Source" does not
    talk about any MVC frameworks in its
    eCommerce example. I think Flex's events, functions, and mx
    components are MVC already. Do they have to be in separate file to
    call them MVC? I do not find that core Flex is harder to read and
    understand than using a MVC framework. I think using the MVC
    framework would hurt the performance because too many additional
    events are dispatched. Any comments?

    MVC is one design pattern that is pretty darn useful for a
    lot of applications, IMHO. There are frameworks that more or less
    force you to think in MVC pattern terms, like Cairngorm and
    PureMVC. But you certainly don't need to use a framework to create
    an overall design pattern of model, view, controller. However, it
    sure can make it easier if you're doing a large project. The book
    you're talking about is a good example. They don't use a framework
    but they have tried to use a form of MVC in the way that they
    implement all the components to ensure things are loosely coupled.
    As far as hurting performance, I'm no expert but there are so
    many thousands of events occurring all the time in Flex that you
    might actually enhance performance if you take more control by
    using custom events of your own creation within a well designed
    framework.
    I'm a fan of the Mate because I get it and it doesn't impose
    a strict structure like Cairngorm. I don't have a whole lot of
    experience with OOP (though I'm sure getting it thanks to this
    forum). Many others have their own opinions and will surely
    recommend other frameworks. However, the bottom line is that if
    you're doing a big project, I would think it would be a huge help
    to at least have a conceptual framework approach in your mind, if
    not part of the code.
    Here's a video intro to Mate
    http://tinyurl.com/mateintro

  • How to deploy coldfusion as mvc framework from server standpoint?.

    Does anyone know how to deploy mvc framework from server
    standpoint?. I have all my business logic as cfcs but I want to
    move them to different server so that my cfm code is in one server
    and my cfcs are in another. Has anyone done this or point me in the
    right direction?.

    Marc E wrote:
    > we've actually been trying to go in the opposite
    direction, mostly for ease
    > of deployments. we have a cluster of CF servers, and
    every time we do a code
    > push, we have to migrate to all servers. it's annoying
    and prone to
    > problems.
    Actually that's exactly the way we have our new high
    availability
    environment configured. All the code runs off an EMC device.
    Not sure
    why I didn't draw this parallel yesterday with running the
    CFML on one
    server and the CFCs on another server--as long as you have a
    sufficiently fast network (we're on gigabit) and
    device/drives (our
    stuff is fiber channel), then as you mention below
    performance probably
    isn't an issue. I'd be curious if doing this over 100 megabit
    with more
    low-end hardware would perform as well as having things on a
    local
    drive, however.
    > We want to move all our code onto one machine, such that
    no webserver has
    > any code on it at all. we deploy code to one machine,
    and all webservers on
    > the cluster benefit from the push. this machine is not
    web accessible at all
    > and thus one could say less prone to security problems
    than a webserver is,
    > although i'm not sure that's such a good reason. mostly
    for us it's ease of
    > deployment.
    Yep, very true, and although the NAS/DAS device isn't
    *directly*
    accessible via the web, remember that's it's accessible by
    the user
    that's being used by the web site users, so there isn't a
    huge security
    benefit here vs. having the code locally. You're absolutely
    right
    > separating normal cfm files from objects seems kind of
    silly, when if you
    > want security you'd put all code on a separate,
    non-web-accessible machine.
    Yeah, this is where we head was earlier in the
    discussion--putting the
    CF "pages" on one server and the CFCs on another just seemed
    a bit wacky
    to me.
    > thanks to CF mapping, you can just point "/" to the code
    root of hte machine
    > on which the code lives, and all is well with the world.
    > This is actually how we have our internal environment
    set up, it's just our
    > production environment where our host is a pain in the
    *** about it.
    Right, this is what we do on our production environment but
    we don't
    even use a CF mapping (though you could). We just point our
    web server
    to the EMC device and everything else just falls into place,
    provided
    you've set up the user CF and your web server process (or
    using "connect
    as" in IIS in W2K3) are running as so they have access to the
    network
    storage device.
    > i'd be extremely surprised to see a performance problem
    with this setup.
    > It's not like the web servers are in philly and the code
    servers are in
    > taiwan, sending thousands of bytes per second. you've
    probably literally got
    > the webserver sitting right beside the server on which
    the code lives. it's
    > virtually the same thing as just keeping CF on the C
    drive and all the code
    > on the D Drive (assuming disk speeds on the machines are
    adequate).
    True, good point. We have extremely good performance (might
    even be
    *faster* than local drive speed) with our EMC device, and
    again I'm not
    sure why I didn't see this parallel yesterday in the
    discussions. Blame
    it on a very hectic week. ;-)
    Matt
    Matt Woodward
    [email protected]
    Adobe Community Expert - ColdFusion

  • WebCenter Sites and Model–view–controller (MVC) framework

    A customer of our started developing their sites using Webcenter Sites, they want to support additional functionality such as transaction management, exception handling, custom logging and so on. I was wondering if anyone has experience with the Model–view–controller (MVC) framework, they consider it an ideal candidate for these features. Has anyone here used the MVC framework in conjunction with WebCenter Sites to write additional java classes, facade layers and utilize the Spring controller to wire the same ? Are you aware of any other options available for this purpose ?
    regards,
    Pietro

    Hi Pietro -
    Using Sites IN a MVC framework is very difficult, because the entire context of WebCenter Sites is burned into the COM.FutureTense.Servlet.SContentServer servlet.  You can't really work around that with any degree of reliability.  Unfortunately, that means that dropping Sites into a pre-existing third party MVC framework doesn't really work. 
    There are a lot of good reasons for that, not the least of which is the two-tiered pagelet-level caching system that makes Sites so very fast at delivery... not that it's any consolation.
    To deal with this some former colleagues of mine and I built the GST Site Foundation ("GSF") framework, which provides a Spring-like MVC container WITHIN sites, instead of the other way around.  If you're familiar with Spring, you'll see patterns similar with the GSF.  My current team and I have blogged about this extensively:
    What is this whole GST Site Foundation thing? | Function1
    Create a Simple "Contact Us" Form with GSF | Function1
    How to Add Your Own DAO to the GSF Actions | Function1
    The full stream is here:  GSF | Function1
    But ultimately, the special sauce is the following: in Sites, create an XML element that contains nothing but a <FTCS> tag, a <CALLJAVA> tag, and a closing </FTCS> tag.  Your CALLJAVA will then call a class that implements the Seed or Seed2 interface, and from in there you have access to the (properly managed) ICS object where you can do all of your magic.  You can then build a lightweight controller here to handle any action you can dream up:
    https://github.com/dolfdijkstra/gst-foundation/blob/master/gsf-wra/src/main/java/com/fatwire/gst/foundation/controller/A…
    Let me know if I can help!
    Regards,
    Tony

  • MVC with Struts?

    If you are going to implement the MVC pattern in a webapp, what is the best framework to use?
    I've done a tutorial with Struts. Is that a good framework?
    Is there any disadvantages by using such frameworks?

    If you are going to implement the MVC pattern in a
    webapp, what is the best framework to use? None if you can do without it. The best solution is always the simplest. But you'd have to provide some requirements to get a better answer. Let me just say I've seen many projects that simply read/write small amounts of data from the database and display it on a web page, yet the architect will throw in struts, hibernate, etc. and almost all of the time (IMO) it's overkill.
    I've done a tutorial with Struts. Is that a good
    framework?Some people love it. Some people hate it. IMO it has many, many problems and I don't care for it one bit. However, it's very popular and lots of people use it, so it's not a bad skillset to have.
    Is there any disadvantages by using such frameworks?There are tons of disadvantages:
    1. The API is external (i.e. out of your control) so when it breaks you can't do anything but hack the source.
    2. Performance can be a problem, since you've got an extra layer of software to run through, but usually isn't. Struts for example isn't going to bog you down.
    3. It costs time (i.e. $$$) to train and come up to speed on how to use these frameworks. If you already know Java and have a small project you could likely complete it in the time it'd take you to learn struts.
    4. Compatibility. When the latest version of struts comes out for example, you might want to upgrade to get the latest features, but you might find it breaks the old API and now you have to fix a bunch of code because it's not backwards compatible. That's probably rare, but it's happened to me more than once with struts.
    5. Struts documentation (IMO) is horrible (maybe it's better today? i haven't used it in awhile) and it's not fun to learn.
    6. Struts error messages are ridiculous and it's often very difficult to figure out what went wrong. Whereas in core Java I find the error messages to be very helpful in telling me what I did wrong.
    The list goes on and on and on. Frameworks are bad news for many projects and then again they are saviors for others.

Maybe you are looking for