当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Unzip! Unsnap! AHHHH!! Our bus
 

 

    摘要:i get excited every time we release a new version of coldfusion. i usually hit the road and talk about the release to customers at their companies, user group events, and conferences. i start the co......
 ·tales from the list @ jdj    »显示摘要«
    摘要: this month were talking about java, web services, and "things not cf" - topics that are fast becoming common subjects of discussion among cfers. im not going to focus on just one cfdj list thread......


Introduction To Naked Objects

unzip! unsnap! ahhhh!! our business object is naked. it is time to strip applications of complex uis and give users direct access to the business objects. the concept is simple: write behaviorally complete business model objects and use generic views and controllers. thus, if a business model object supports a public behavior, then the user has access to that behavior. so why do we need naked objects?

our simple naked objects project 【程序编程相关:Web Services Securit

chances are you have struggled to truly understand the model-view-controller (mvc) pattern. why is this? the concepts are easy, right? the model contains the core business logic; the view is responsible for displaying a given models data; the controller controls the interactions between the model and the view, typically through event notification. of course, anyone who has worked with swing knows that the view and controller are often combined in the same component. for example, a jtable has a model, but is also both the view and controller. business logic can end up in all three layers, too, which violates the dry principle (dont repeat yourself). 【推荐阅读:Orchestrating Web Se

package com.briancoyner.naked.addressbook; import org.nakedobjects.object.abstractnakedobject; public class person extends abstractnakedobject { // you must implement this method, which comes from the base class, before // the class compiles. well talk more about this in a bit. public title title() { return null; } }

the naked objects framework requires that all naked objects implement the nakedobject interface. to keep things simple, we can extend from abstractnakedobject. the abstractnakedobject provides the base functionality that makes up a naked object, allowing us to focus on the business problem, which is creating a simple address book. any object that is "naked" can be seen by the user. we will see how to expose objects to an application later in the article. now that our person is naked, we need to add a few attributes and provide a way to modify them. this is accomplished using strict naming conventions and specific naked objects framework classes. lets add a few attributes: first name, last name, and birthdate. 【扩展信息:Troubleshooting .NET

we are going to build a simple address book using the naked objects framework. an address book works nicely because it fits into the naked objects philosophy and, of course, it is easy to understand. you may download the example application here. our first requirement is that our address book may contain zero or more people. here is the first iteration of our naked person:


...   下一页
 ·more rss for java    »显示摘要«
    摘要:in my previous article, we looked at the creation of a simple rss feed using the informa api. in this article, we are going to refine the earlier solution and look at some other aspects of the informa......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE