Skip to main content

Home/ SoftwareEngineering/ Group items matching "patterns" in title, tags, annotations or url

Group items matching
in title, tags, annotations or url

Sort By: Relevance | Date Filter: All | Bookmarks | Topics Simple Middle
kuni katsuya

Java EE Revisits Design Patterns: Asynchronous - Java Code Geeks - 0 views

  • Java EE Revisits Design Patterns: Asynchronous
  • @Asynchronous
  • tell the JavaEE container to run the called method in a separate thread asynchronously
  • ...5 more annotations...
  • @Asynchronous
  • @Asynchronous
  • Future<>
  • simple to use
  • as a return type and to receive a result asynchronously
kuni katsuya

AnemicDomainModel - 0 views

  • AnemicDomainModel
  • Eric Evans
  • basic symptom of an Anemic Domain Model
  • ...40 more annotations...
  • The catch comes when you look at the
  • behavior
  • there is hardly any behavior on these objects, making them little more than bags of getters and setters
  • I was chatting with
    • kuni katsuya
       
      note, the 'i' here, is mr. MARTIN FOWLER!! and of course, eric evans hails from domain driven design fame
  • fundamental horror
  • it's so contrary to the basic idea of object-oriented design
  • combine
  • data and process together
  • procedural style design
  • completely miss the point of what object-oriented design is all about
  • It's also worth emphasizing that putting behavior into the domain objects
  • should not contradict the solid approach of using layering to separate domain logic from such things as persistence and presentation responsibilities
  • logic that should be in a domain object is domain logic
  • validations
  • calculations
  • business rules
  • One source of confusion in all this is that many OO experts do recommend putting a layer of procedural services on top of a domain model, to form a Service Layer
  • this isn't an argument to make the domain model
  • void of behavior
  • service layer advocates use a service layer in conjunction with a behaviorally rich domain model.
  • does not contain business rules or knowledge, but
  • only coordinates
  • tasks and delegates work to
  • collaborations of domain objects
  • in the next layer down
  • can have state that reflects the
  • progress of a task
  • for the user or the program
  • Domain Layer
  • Application Layer
  • Service Layer
  • Responsible for
  • representing concepts of the business
  • business rules
  • This layer is the heart of business software
    • kuni katsuya
       
      ... and has the *most value* to an organization investing in writing their own software infrastructure software (eg. user interface, orm, application server-related frameworks) or plumbing code should be treated as commodities where possible, unless, the business consciously decides that a custom, home-grown implementation is absolutely required for patenting or other differentiation reasons and/or that no existing off-the-shelf solution can be used but these cases should be rare! do not blindly fall for the not-invented-here syndrome
  • all the key logic lies in the domain layer
  • I don't know why this anti-pattern is so common
  • if they come from a
  • data background
    • kuni katsuya
       
      this is why during every sprint, i reiterate that the data model up approach to designing the system is OH SO WRONG but nobody listens
  • J2EE's Entity Beans
    • kuni katsuya
       
      damn baggage from  eons ago!!!
kuni katsuya

Open Session in View | Hibernate | JBoss Community - 0 views

  • Open Session in View
    • kuni katsuya
       
      do not do this!  this be an anti-pattern
kuni katsuya

WYTIWYR : What You Test Is What You Run « Antonio's Blog - 0 views

  •  
    " Don't mock types you don't own TDD: Only mock types you own Test Smell: Everything is mocked Testing Anti-Patterns: How to Fail With 100% Test Coverage TDD: Only mock types you own Test Smell: Everything is mocked Arquillian"
kuni katsuya

Java EE wins over Spring « Bill the Plumber - 0 views

  • Spring is controlled by ONE COMPANY. It is not an independent open source organization like Apache. At least with Java EE there are multiple OPEN SOURCE implementations. How long before VMWare decides its $500 million investment needs to be recouped and they start charging for Spring in a big way? Don’t think it can happen? Think again…VMWare is in the same poor position BEA/WLS was against JBoss with Red Hat’s VM/Cloud tech eating away at VMWare’s margins. There is a much higher chance of them scrambling for revenue sources than Red hat ever being acquired by Oracle.
  • Core JavaServer Faces JSF 2.0 Cookbook JavaServer Faces 2.0, The Complete Reference EJB 3.1 Cookbook Enterprise JavaBeans 3.1 Beginning Java EE 6 with GlassFish 3 Java EE 6 with GlassFish 3 Application Server Java EE 6 Development With NetBeans 7 Real World Java EE Patterns Rethinking Best Practices Real World Java EE Night Hacks Dissecting the Business Tier
  • books about the different APIs of Java EE 6:
  • ...8 more annotations...
  • if you’ve heard Rod Johnson speak he is always adamant that Spring has replaced Java EE. Its good to see that his rhetoric is utter BS!
  • Sorry, even Spring MVC sucks as much balls as JSF does.
  • Java EE wins over Spring
  • CDI closed API hole
  • Application server started to get their act together with regards to boot time.  It started with Glassfish and ended with JBoss 7.  Both of which can boot in a matter of seconds.
  • Arquillian allows you to run your unit tests in a real environment with real transactions, etc.  Personally I always despised mocks because they didn’t test in the environment you were going to run in.  I thought they were pointless and to this day, I refuse to use this testing pattern.
  • I’m glad Rod and company were able to cash out with the VMWare acquisition before Java EE was able to regain its dominance
  • SpringSource pushed Java EE to innovate and for that I’m very grateful.  For Java EE, it was either evolve or die.  They evolved, now its time for Spring to die.
kuni katsuya

MySQL & Apache Derby as jdbcRealm for Apache Shiro | Nabil Hachicha - 0 views

  • http://localhost:8080/ShiroDemo/auth/secured.jsp
  • MySQL & Apache Derby as jdbcRealm for Apache Shiro
  • Step 1 creating a simple WebApp
  • ...36 more annotations...
  • Step 2 securing some content
  • create a database that will hold the list of the authorized users along with their password
  • Create a new directory “auth” and add a new JSP under it, let’s call it “BackOffice.jsp“
    • kuni katsuya
       
      create directory 'auth' under webapps directory
  • enable Shiro into our project by adding a ServletFilter into our Web.xml
  •  <filter-class>05            org.apache.shiro.web.servlet.IniShiroFilter06        </filter-class>
  • 10    <filter-mapping>11         <filter-name>ShiroFilter</filter-name>12         <url-pattern>/*</url-pattern>13    </filter-mapping>
  • classpath:shiro.ini
  • shiro-core
  • shiro-web
  • create shiro.ini under resource dir
  • 07ds.jdbcUrl=jdbc:derby://localhost:1527/shiro_schema08ds.username = APP09ds.password = APP
  • 15/auth/** = authcBasic16/** = anon
  • jdbcRealm.authenticationQuery
  • jdbcRealm=org.apache.shiro.realm.jdbc.JdbcRealm
  • setup the jdbc realm, this is where Shiro will find the authorized users
  • map the URLs to be protected, all the url under /auth should be authenticated with basic HTTP authentication
  • All the other URLs should be accessed without authentication
  • Add a new directory under src let’s call it production we will create a new shiro configuration file compatible with MySQL
    • kuni katsuya
       
      create src/production/resources/shiro.ini with contents below
  • 06ds.serverName = localhost07ds.user = ADM08ds.password = secret12309ds.databaseName = shiro_schema
  • jdbcRealm which use a MySQL driver
  • jdbcRealm.dataSource = $ds
  • jdbcRealm.dataSource=$ds
  • added the appropriate dependency to maven pom.xml
  • mysql-connector-java
  • environment.type
  • staging
  • 13                <jdbc.user>APP</jdbc.user>14                <jdbc.passwd>APP</jdbc.passwd>15                <jdbc.url>jdbc:derby://localhost:1527/shiro_schema</jdbc.url>16                <jdbc.driver>org.apache.derby.jdbc.ClientDriver</jdbc.driver>
  • src/main/resources
  • derbyclient
  • production
  • environment.type
  • 45                <jdbc.user>ADM</jdbc.user>46                <jdbc.passwd>secret123</jdbc.passwd>47                <jdbc.ds>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</jdbc.ds>48                <jdbc.serverName>localhost</jdbc.serverName>49                <jdbc.databaseName>shiro_schema</jdbc.databaseName>
  • src/production/resources
  • To build and run for staging
  • To build for production
  • -Denvironment.type=prod
kuni katsuya

Value Object vs. Data Transfer Object (VO vs. DTO) : Adam Bien's Weblog - 0 views

kuni katsuya

Lean service architectures with Java EE 6 - JavaWorld - 0 views

  • Entity-Control-Boundary (ECB) architectural pattern matches perfectly with our pattern language
  • domain structure is an Entity, the Control is a service, and the Boundary is realized with a facade
  • In simpler cases the facade and service can collapse, and a service would be realized only as a facade's method in that case
kuni katsuya

Generic CRUD Service aka DAO - EJB 3.1/0 Code - Only If You Really Needed : Adam Bien's Weblog - 0 views

  • Generic CRUD Service
  • The term Data Access Object (DAO)
  • is actually wrong
    • kuni katsuya
       
      this is one reason i hate using the term 'dao' in our ee6 project
  • ...7 more annotations...
  • easy with generics
  • create
  • find(
  • update(
  • delete(
  • CrudService
  • @TransactionAttribute(TransactionAttributeType.MANDATORY)
kuni katsuya

Java API Design Checklist « The Amiable API - 0 views

  • Java API Design Checklist
  • Do not use
  • marketing
  • ...18 more annotations...
  • project
  • organizational
  • names
  • Do not move or rename the package of an
  • already released public API
  • Begin with a short, one sentence summary of the API
  • Provide enough details
  • Include the API version number
  • Ensure each type has a single, well-defined purpose
  • Type Design Checklist
  • Ensure types represent domain concepts, not design abstractions
  • Follow consistent design patterns when designing related types
  • Favor enumeration types over constants
  • Consider generic types
  • Avoid deep inheritance hierarchies
  • Do not use public nested types
  • Do not declare public or protected fields
  • Do not expose implementation inheritance to the client
kuni katsuya

DDD: putting the model to work - 0 views

  • DDD: putting the model to work
  • foundations of domain-driven design:How models are chosen and evaluated;How multiple models coexist;How the patterns help avoid the common pitfalls, such as overly interconnected models;How developers and domain experts together in a DDD team engage in deeper exploration of their problem domain and make that understanding tangible as a practical software design.
kuni katsuya

Domain Language /Newsletter - 0 views

  • Expanding a Bubble Getting Started with DDD When Surrounded by Legacy Systems IV
kuni katsuya

Domain Language /Newsletter - 0 views

  • Getting Started with DDD When Surrounded by Legacy Systems II
  • Strategy 2: Autonomous Bubble
‹ Previous 21 - 40 of 61 Next › Last »
Showing 20 items per page