A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au

Size: px
Start display at page:

Download "A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au"

Transcription

1 A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au Image CC: Luke Sleeman - Freelance developer specialising in Android and today I m going to be presenting A simple, scalable app architecture with Android annotations

2 Agenda Introduction The architecture - History, Goals, Overview Services Domain object Testing UI Closing thoughts I will be presenting an overview of the architecture, then we will be diving in and exploring various components of it in more detail, including: Service, the domain objects, testing and the UI Very code heavy. Medium to advanced audience.

3 History The architecture I will be presenting today grew out of my needs as a freelancer I would come in to a job and I would either be doing new development or enhancing and existing app, and I needed a go to application architecture The architecture I have been presenting has now been used for 3 years now - stood up very well. There has recently been a lot of talk about how to architect android applications. What I will be showing today holds up very well against other proposals.

4 Goals Quick, simple Typically data driven apps - get some stuff from a web service, store it locally, show it to the user, submit stuff back to the web service Scalable - Handle small apps and big ones Unsurprising, easy to jump in and out of, clear and concise, makes sense to anybody. Obvious. Testable Boring! A good way to understand an architecture is to understand how what its trying to achieve. These are the main drivers for the architecture I will be presenting today

5 The architecture! User Interface Domain objects Services Three tiers - surprising yeah! Its probably the most common architecture out there Well, the reason its so common is it works and everybody understands it Briefly explain the 3 tiers Services contain services - these things talk to the DB, talk to webservice, load and save domain objects. Whenever the UI wants to get a list of domain objects, or save them, it talks to the service Domain objects - contains all of our business logic. This is where the java 101 class person lives, with getname and getage UI - All our activities, fragments, views, adapters etc

6 This is what it looks like You could even break these things out into their own project if it was big enough Conversely if you only have a 3 or 4 classes, just put them all in one place!

7 What is AndroidAnnotations? Annotate your code - works of JDK annotations Code generation - you can look behind the curtain to see how the magic works. MyActivity_ Includes annotation support for a lot of other libraries I use such as ormlite You don t have to use it But you would be silly not to :-) There are plenty of other similar libraries (retrofit, butter knife, dagger) There are lots of annotations - This isn t an introduction to aneroid annotations, we will only cover the ones of interest to our architecture

8 So what about Android annotations? Domain objects Services AndroidAnnotations User Interface Android annotations acts as a glue which ties it all together Supports and strengthens each layer - so instead of reading inner classes, callbacks and boilerplate, its easier to see the intention of the code

9 Services User Interface Domain objects Services Can do many things: DB access, WS access, Saving and loading data, files, etc. Utility code Big or little - as small as a few static utility methods You can have one or many services in your app Always singletons, always stateless

10 Typical methods List<Users> getusersfromwebservice() AndroidDatabaseResults searchforsite(string searchtext) UserInfo getinfofromfacebook(int key) Here are some typical methods that you would expect to see in a service object Talking to web services Querying the DB Talking to 3rd party libraries and services - you can wrap up and hide all the complexity

11 A Simple Service public class PizzaService { private static List<Pizza> pizzas; public static List<Pizza> getpizzas(){ if(pizzas == null){ pizzas = new ArrayList<Pizza>(); pizzas.add(new Pizza("Luke Special", 10.50)); pizzas.add(new Pizza("Margherita", 9.50)); return pizzas; Here is a very simple service for an app with no DB and no webservices, which displays pizzas. The service is responsible for building the pizzas and returning them

12 A more complex = EBean.Scope.Singleton) public class FriendService = ExampleDBHelper.class, model = Friend.class) protected RuntimeExceptionDao<Friend, String> protected FriendListWebservice webservice; public List<Friend> getfriends(){ return friendsdao.queryforall(); public void downloadandsavefriend(int id) throws IOException { Friend newfriend = webservice.getfriend(id); friendsdao.create(newfriend); Here is a more complex service built with AndroidAnnotations. You could do all this without AA, but you wont fit it on one slide! Part of a social networking application Point out parts of code Note that the web service code is synchronous! We will discuss this more when we get to the UI. Also note that it throws exception. This is because the UI might want to do different things based off different exceptions

13 Domain objects User Interface Domain objects Services POJO s. Sometimes called model objects. Represent entities in the business domain - Person, Article, Order, LineItem, Message Hold onto the data while its passed around in the app Contain business logic - any tricky business rules go here!

14 A simple domain object public class Pizza { private String name; private double price; public Pizza(String name, double price) { this.name = name; this.price = price; public String getname() { return name; public void setname(string name) { Here is a simple domain object. There really is nothing special about it and I may or may not have copied it from my 1st semester java notes :-)

15 A more complex domain public class Friend = true) private int private String username; public int getid() { return id; public void setid(int id) { this.id = id; public String getusername() { return username; Again, there is really nothing to special - we do have some annotations Explain annotations Point out that those annotations are not part of AA - they are from OrmLite

16 Domain objects Relationships Your domain objects are probably going to have relationships - one to one, one to many, etc

17 Domain objects Relationships Option 1 - In the = "user") private List< Address> addresses; Option 2 - In the service public List< Address> getfriend s(int id) Your domain objects are probably going to have relationships - one to one, one to many, etc There are two places you can put them - in the domain objects and in the service Where they go depends on how the objects will be used by the UI. Put too much in the objects and you will have to pull down the whole tree. Put too much in the service and you will just have reams of loading code A good heuristic is to split the domain object tree where screens are split. If you have the addresses on the same screen as the people, then include in the objects. If they are different screens in the DB.

18 Unit tests User Interface Unit Tests Domain objects Services Test talk to domain objects and services. They act like a bit like the UI. They don t test the UI I ve found that UI tests don t give good value for money. If you UI contains complex logic and you feel you want to test it, thats a good signal to move it into the domain. Tests-first is good too.

19 Some basic tests public class PizzaTest extends AndroidTestCase{ public void testgetpizzas(){ List<Pizza> pizzalist = PizzaService.getPizzas(); assertnotnull(pizzalist); public class FriendTest extends AndroidTestCase { public void testfriend(){ FriendService friendservice = FriendService_.getInstance_(getContext()); assertnotnull(friendservice.getfriends()); Here is two very simple unit tests - one which uses a static service and one which uses an Android Annotations EBean Just wanted to point out this is how you get a hold of the EBean if you are in the service

20 The UI User Interface Domain objects Services The UI contains all the standard stuff you would expect - activities, adapters, views, etc Importantly it also handles the threading!

21 This is where android annotations @ListClick The UI is where android annotations really shines. And thats because the UI is the part of Android that is most fraught with boilerplate Explain what each of the annotations do

22 Getting services and domain public class BestFriendActivity extends Activity protected TextView protected FriendService friendservice; private Friend protected void setupbestfriend(){ bestfriend = friendservice.getbestfriend(); protected void poke(){ friendservice.poke(bestfriend); Here is a simple example of a basic Activity which uses android annotations. Of course you can do all this without AA Explain each of the annotations

23 public class FriendListActivity extends Activity protected ListView protected ProgressBar protected FriendService protected void startdownload(){ progressspinner.setvisibility(view.visible); downloadfriends(); Threading and keeping network activity off the UI thread is a huge problem in Android. Its not that we don t have plenty of good solutions (async task, async-http) but they all require so much boilerplate! Here is an AndroidAnnotations solution that is much simpler This is just the setup - a basic activativity. The magic happens in downloadpizza

24 protected void downloadfriends(){ try{ List<Friends> friendlist = service.downloadfriendlist(); displayfriends(friendlist); catch(ioexception e){ protected void displayfriends(list<friends> friendlist){ protected void displaydownloaderror(){ progressspinner.setvisibility(view.gone); Here is the actual magic not that there is much there Background thread runs in the background UI threads run on the UI thread So here we are handling some fairly complex threading work in a simple and concise way

25 There is a bug! Some of you may have noticed a bug in the previous slide.

26 protected void downloadfriends(){ try{ List<Friends> friendlist = service.downloadfriendlist(); displayfriends(friendlist); catch(ioexception e){ protected void displayfriends(list<friends> friendlist){ protected void displaydownloaderror(){ progressspinner.setvisibility(view.gone); What happens if thread takes a long time and the user leaves the methods will still get run and app will crash

27 Threading - dealing with activity shutdown Option 1 - Let our background task run and don t update protected void displayfriends(list<friend> friendlist){ if(isdestroyed()) return; Option 2 - Cancel background = "download") protected void protected void ondestroy() { BackgroundExecutor.cancelAll("download", false); super.ondestroy(); Two options don t update ui, or cancel Doesn't matter which you choose, but be consistent!

28 Closing thoughts

29 Closing thoughts Architecture is important! Architecture doesn t have to be complex - Keep it Simple! You need to be constantly thinking - What does this add, is it worth it? Hope that what I have presented today provides some food for thought. We have seen a lot of discussion about architecture over the past few years - this is good! However some of the proposed architectures I have seen, seem hell bent on replicating the worse excesses of enterprise java. Remember the first of my goals was to have an architecture that is quick and simple Hope that what I have demoed today provides some food for thought, encourages you to look at your own lightweight architectures and try out android annotations

30 Questions?

A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au

A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au Image CC: https://flic.kr/p/6oqczb Agenda Introduction The architecture - History,

More information

A simple, scalable app architecture with Android annotations Luke Sleeman Freelance Android developer lukesleeman.com.au

A simple, scalable app architecture with Android annotations Luke Sleeman Freelance Android developer lukesleeman.com.au A simple, scalable app architecture with Android annotations Luke Sleeman Freelance Android developer lukesleeman.com.au Image CC: https://flic.kr/p/6oqczb Agenda Introduction The architecture - an overview

More information

05. SINGLETON PATTERN. One of a Kind Objects

05. SINGLETON PATTERN. One of a Kind Objects BIM492 DESIGN PATTERNS 05. SINGLETON PATTERN One of a Kind Objects Developer: What use is that? Guru: There are many objects we only need one of: thread pools, caches, dialog boxes, objects that handle

More information

INTRODUCTION. 2

INTRODUCTION. 2 1 INTRODUCTION It is of no secret that Android is loved by millions of people around the world. Created and developed by Google, it would be most developers dream job. That being said, there are a lot

More information

Kotlin for Android Developers

Kotlin for Android Developers Kotlin for Android Developers Learn Kotlin the easy way while developing an Android App Antonio Leiva This book is for sale at http://leanpub.com/kotlin-for-android-developers This version was published

More information

These are notes for the third lecture; if statements and loops.

These are notes for the third lecture; if statements and loops. These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern

More information

Lecture 3. COMP1006/1406 (the Java course) Summer M. Jason Hinek Carleton University

Lecture 3. COMP1006/1406 (the Java course) Summer M. Jason Hinek Carleton University Lecture 3 COMP1006/1406 (the Java course) Summer 2014 M. Jason Hinek Carleton University today s agenda assignments 1 (graded) & 2 3 (available now) & 4 (tomorrow) a quick look back primitive data types

More information

Kotlin for Android Developers

Kotlin for Android Developers Kotlin for Android Developers Learn Kotlin the easy way while developing an Android App Antonio Leiva This book is for sale at http://leanpub.com/kotlin-for-android-developers This version was published

More information

A Separation of Concerns Clean Architecture on Android

A Separation of Concerns Clean Architecture on Android A Separation of Concerns Clean Architecture on Android Kamal Kamal Mohamed Android Developer, //TODO Find Better Title @ Outware Mobile Ryan Hodgman Official Despiser of Utils Classes @ Outware Mobile

More information

Principles of Software Construction: Testing: One, Two, Three

Principles of Software Construction: Testing: One, Two, Three Principles of Software Construction: Testing: One, Two, Three Josh Bloch Charlie Garrod School of Computer Science 1 Administrivia Homework 4a due today, 11:59 p.m. Design review meeting is mandatory But

More information

Dealing with Bugs. Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 27 04/21/2009

Dealing with Bugs. Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 27 04/21/2009 Dealing with Bugs Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 27 04/21/2009 University of Colorado, 2009 1 Goals 2 Review material from Chapter 11 of Pilone & Miles Dealing with

More information

PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 10. PUTTING IT ALL TOGETHER. Are we there yet?

PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 10. PUTTING IT ALL TOGETHER. Are we there yet? PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 10. PUTTING IT ALL TOGETHER Are we there yet? Developing software, OOA&D style You ve got a lot of new tools, techniques, and ideas about how to develop

More information

learn programming the right way

learn programming the right way Coding 101 learn programming the right way 1 INTRODUCTION Before you begin learning how to code, it s first useful to discuss why you would want to learn web development. There are lots of good reasons

More information

Copyright 2014 Blue Net Corporation. All rights reserved

Copyright 2014 Blue Net Corporation. All rights reserved a) Abstract: REST is a framework built on the principle of today's World Wide Web. Yes it uses the principles of WWW in way it is a challenge to lay down a new architecture that is already widely deployed

More information

Day 3. COMP 1006/1406A Summer M. Jason Hinek Carleton University

Day 3. COMP 1006/1406A Summer M. Jason Hinek Carleton University Day 3 COMP 1006/1406A Summer 2016 M. Jason Hinek Carleton University today s agenda assignments 1 was due before class 2 is posted (be sure to read early!) a quick look back testing test cases for arrays

More information

UI-Testing, Reactive Programming and some Kotlin.

UI-Testing, Reactive Programming and some Kotlin. UI-Testing, Reactive Programming and some Kotlin anders.froberg@liu.se Load up your guns, and bring your friends This is the end, My only Friend, the end Äntligen stod prästen i predikstolen I ll be back

More information

Programming in Android. Nick Bopp

Programming in Android. Nick Bopp Programming in Android Nick Bopp nbopp@usc.edu Types of Classes Activity This is the main Android class that you will be using. These are actively displayed on the screen and allow for user interaction.

More information

Android About.me/DavidCorrado Mobile Meetup Organizer

Android About.me/DavidCorrado Mobile Meetup Organizer Android Tips/Tricks @DavidCorrado About.me/DavidCorrado Mobile Meetup Organizer IDE Don t Use Eclipse Use either Android Studio/IntelliJ They are basically the same thing. They are both built off of IntelliJ

More information

BE PROACTIVE USE REACTIVE

BE PROACTIVE USE REACTIVE BE PROACTIVE USE REACTIVE This morning we re going to talk about reactive programming. We ll cover some of the what, why, and how, hopefully with a bend towards grasping the fundamentals. We ll have some

More information

OFFLINE MODE OF ANDROID

OFFLINE MODE OF ANDROID OFFLINE MODE OF ANDROID APPS @Ajit5ingh ABOUT ME new Presenter( Ajit Singh, github.com/ajitsing, www.singhajit.com, @Ajit5ingh ) AGENDA Why offline mode? What it takes to build an offline mode Architecture

More information

What is it? CMSC 433 Programming Language Technologies and Paradigms Spring Approach 1. Disadvantage of Approach 1

What is it? CMSC 433 Programming Language Technologies and Paradigms Spring Approach 1. Disadvantage of Approach 1 CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Singleton Pattern Mar. 13, 2007 What is it? If you need to make sure that there can be one and only one instance of a class. For example,

More information

Enums. In this article from my free Java 8 course, I will talk about the enum. Enums are constant values that can never be changed.

Enums. In this article from my free Java 8 course, I will talk about the enum. Enums are constant values that can never be changed. Enums Introduction In this article from my free Java 8 course, I will talk about the enum. Enums are constant values that can never be changed. The Final Tag To display why this is useful, I m going to

More information

Android Best Practices

Android Best Practices Android Best Practices Agenda Introduction The clean architecture Testing Support library Libraries we can depend on What's next Introduction Introduction Android Studio Gradle Material Design Lollipop

More information

It s possible to get your inbox to zero and keep it there, even if you get hundreds of s a day.

It s possible to get your  inbox to zero and keep it there, even if you get hundreds of  s a day. It s possible to get your email inbox to zero and keep it there, even if you get hundreds of emails a day. It s not super complicated, though it does take effort and discipline. Many people simply need

More information

Top 7 Lessons From My First Big Silverlight Project

Top 7 Lessons From My First Big Silverlight Project Top 7 Lessons From My First Big Silverlight Project Benjamin Day Benjamin Day Consulting, Inc. Level: Intermediate/Advanced Benjamin Day Consultant, Coach, Trainer Professional Scrum Development Trainer

More information

Agenda Time (PT) 8:45 a.m. Event Platform Opening 9:00 a.m. Keynote - Java: Present and Future Java EE 7 Java SE 8 Java Embedded

Agenda Time (PT) 8:45 a.m. Event Platform Opening 9:00 a.m. Keynote - Java: Present and Future Java EE 7 Java SE 8 Java Embedded Virtual Developer Day: Java 2014 May 6 th 9:00 a.m. - 1:00 p.m. PDT / 12:00 p.m. - 4:00 p.m. EDT / 1:00 p.m. 5:00 p.m. BRT Agenda Time (PT) 8:45 a.m. Event Platform Opening 9:00 a.m. Keynote - Java: Present

More information

Control Structures. Code can be purely arithmetic assignments. At some point we will need some kind of control or decision making process to occur

Control Structures. Code can be purely arithmetic assignments. At some point we will need some kind of control or decision making process to occur Control Structures Code can be purely arithmetic assignments At some point we will need some kind of control or decision making process to occur C uses the if keyword as part of it s control structure

More information

TestComplete 3.0 Overview for Non-developers

TestComplete 3.0 Overview for Non-developers TestComplete 3.0 Overview for Non-developers Copyright 2003 by Robert K. Leahey and AutomatedQA, Corp. All rights reserved. Part : Table of Contents Introduction 1 About TestComplete 1 Basics 2 Types of

More information

Testable Java. Michael Feathers Object Mentor, Inc.

Testable Java. Michael Feathers Object Mentor, Inc. TestableJava MichaelFeathers mfeathers@objectmentor.com ObjectMentor,Inc. Haveyouevertriedtowriteunittestsforcodethatdoesn thavethem?ifyouhave, chancesareyou verunintoanumberofproblems.codethatwasn tdesignedtobe

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

Lecture 5: Implementing Lists, Version 1

Lecture 5: Implementing Lists, Version 1 CS18 Integrated Introduction to Computer Science Fisler, Nelson Lecture 5: Implementing Lists, Version 1 Contents 1 Implementing Lists 1 2 Methods 2 2.1 isempty...........................................

More information

Mock Objects and Distributed Testing

Mock Objects and Distributed Testing Mock Objects and Distributed Testing Making a Mockery of your Software Brian Gilstrap Once, said the Mock Turtle at last, with a deep sigh, I was a real Turtle. (Alice In Wonderland, Lewis Carroll) The

More information

Thinking Functionally

Thinking Functionally Thinking Functionally Dan S. Wallach and Mack Joyner, Rice University Copyright 2016 Dan S. Wallach, All Rights Reserved Reminder: Fill out our web form! Fill this out ASAP if you haven t already. http://goo.gl/forms/arykwbc0zy

More information

Tiers (or layers) Separation of concerns

Tiers (or layers) Separation of concerns Tiers (or layers) Separation of concerns Hiding the type of storage from the client class Let s say we have a program that needs to fetch objects from a storage. Should the program have to be concerned

More information

Unit Testing and Test Driven Design

Unit Testing and Test Driven Design Unit Testing and Test Driven Design Björn Beskow Callista Enterprise AB bjorn.beskow@callista.se http://www.callista.se/enterprise CADEC 2003-01-29, Unit Testing and Test Driven Design, Slide 1 Unit Testing

More information

IMPORTANT WORDS AND WHAT THEY MEAN

IMPORTANT WORDS AND WHAT THEY MEAN MOBILE PHONES WHAT IS DATA Data is Internet. It can let you do lots of different things on your phone or tablet. You can send or receive texts, emails or photos, listen to music, watch TV shows, movies

More information

Social Bookmarks. Blasting their site with them during the first month of creation Only sending them directly to their site

Social Bookmarks. Blasting their site with them during the first month of creation Only sending them directly to their site Hey guys, what's up? We have another, jammed packed and exciting bonus coming at you today. This one is all about the "Everyone knows Everybody" generation; where everyone is socially connected via the

More information

The Object Class. java.lang.object. Important Methods In Object. Mark Allen Weiss Copyright 2000

The Object Class. java.lang.object. Important Methods In Object. Mark Allen Weiss Copyright 2000 The Object Class Mark Allen Weiss Copyright 2000 1/4/02 1 java.lang.object All classes either extend Object directly or indirectly. Makes it easier to write generic algorithms and data structures Makes

More information

Software Engineering Testing and Debugging Testing

Software Engineering Testing and Debugging Testing Software Engineering Testing and Debugging Testing Prof. Dr. Peter Thiemann Universitt Freiburg 08.06.2011 Recap Testing detect the presence of bugs by observing failures Debugging find the bug causing

More information

Voice. The lost piece of the BYOD puzzle.

Voice. The lost piece of the BYOD puzzle. Voice. The lost piece of the BYOD puzzle. Contents What s wrong with BYOD? 3 The issue of intimacy 4 How voice got left out of the picture 5 Why voice will always be big for business 6 Introducing smartnumbers

More information

Innovative and Pragmatic Java Source Code Generation. Nikolche Mihajlovski

Innovative and Pragmatic Java Source Code Generation. Nikolche Mihajlovski Innovative and Pragmatic Java Source Code Generation Nikolche Mihajlovski Introduction Hello, world! System.out.println("Hello, GeeCON world!"); Person me = new Person(); me.setfirstname("nikolche"); me.setlastname("mihajlovski");

More information

Adapting elearning for Mobile - Learning from Wonderful Mistakes (Sep 14)

Adapting elearning for Mobile - Learning from Wonderful Mistakes (Sep 14) Adapting elearning for Mobile - Learning from Wonderful Mistakes (Sep 14) by Paul Clothier September 8, 2014 Rather than quickly jumping to adapt your elearning modules for mobile, think of ways you can

More information

EMBEDDED MESSAGING USING ACTIVEMQ

EMBEDDED MESSAGING USING ACTIVEMQ Mark Richards EMBEDDED MESSAGING USING ACTIVEMQ Embedded messaging is useful when you need localized messaging within your application and don t need (or want) an external message broker. It s a good technique

More information

Storing Data in Objects

Storing Data in Objects Storing Data in Objects Rob Miles Department of Computer Science 28d 08120 Programming 2 Objects and Items I have said for some time that you use objects to represent things in your problem Objects equate

More information

CSE 142/143 Unofficial Commenting Guide Eric Arendt, Alyssa Harding, Melissa Winstanley

CSE 142/143 Unofficial Commenting Guide Eric Arendt, Alyssa Harding, Melissa Winstanley CSE 142/143 Unofficial Commenting Guide Eric Arendt, Alyssa Harding, Melissa Winstanley In Brief: What You Need to Know to Comment Methods in CSE 143 Audience o A random person you don t know who wants

More information

RMI & RPC. CS 475, Spring 2019 Concurrent & Distributed Systems

RMI & RPC. CS 475, Spring 2019 Concurrent & Distributed Systems RMI & RPC CS 475, Spring 2019 Concurrent & Distributed Systems Why expand to distributed systems? Scalability Performance Latency Availability Fault Tolerance Distributed Systems for Fun and Profit, Takada!2

More information

Introduction to Databases

Introduction to Databases Introduction to Databases Got something to say? Share your comments [/articles/introduction_to_databases/comments/] on this topic with other web professionals In: Articles [/types/articles/] By Paul Tero

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

A few important patterns and their connections

A few important patterns and their connections A few important patterns and their connections Perdita Stevens School of Informatics University of Edinburgh Plan Singleton Factory method Facade and how they are connected. You should understand how to

More information

Plan. A few important patterns and their connections. Singleton. Singleton: class diagram. Singleton Factory method Facade

Plan. A few important patterns and their connections. Singleton. Singleton: class diagram. Singleton Factory method Facade Plan A few important patterns and their connections Perdita Stevens School of Informatics University of Edinburgh Singleton Factory method Facade and how they are connected. You should understand how to

More information

Test suites Obviously you have to test your code to get it working in the first place You can do ad hoc testing (testing whatever occurs to you at

Test suites Obviously you have to test your code to get it working in the first place You can do ad hoc testing (testing whatever occurs to you at JUnit Test suites Obviously you have to test your code to get it working in the first place You can do ad hoc testing (testing whatever occurs to you at the moment), or You can build a test suite (a thorough

More information

Bugs in software. Using Static Analysis to Find Bugs. David Hovemeyer

Bugs in software. Using Static Analysis to Find Bugs. David Hovemeyer Bugs in software Programmers are smart people We have good techniques for finding bugs early: Unit testing, pair programming, code inspections So, most bugs should be subtle, and require sophisticated

More information

Using JNDI from J2EE components

Using JNDI from J2EE components Using JNDI from J2EE components Stand-alone Java program have to specify the location of the naming server when using JNDI private static InitialContext createinitialcontext() throws NamingException {

More information

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX Shale and the Java Persistence Architecture Craig McClanahan Gary Van Matre ApacheCon US 2006 Austin, TX 1 Agenda The Apache Shale Framework Java Persistence Architecture Design Patterns for Combining

More information

COMP390 (Design &) Implementation

COMP390 (Design &) Implementation COMP390 (Design &) Implementation Phil (& Dave s) rough guide Consisting of some ideas to assist the development of large and small projects in Computer Science (and a chance for me to try out some features

More information

TOP DEVELOPERS MINDSET. All About the 5 Things You Don t Know.

TOP DEVELOPERS MINDSET. All About the 5 Things You Don t Know. MINDSET TOP DEVELOPERS All About the 5 Things You Don t Know 1 INTRODUCTION Coding and programming are becoming more and more popular as technology advances and computer-based devices become more widespread.

More information

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Slide 1: Cover Welcome to lesson 3 of the db2 on Campus lecture series. Today we're going to talk about tools and scripting, and this is part 1 of 2

More information

A team-oriented open source password manager with a focus on transparency, usability and security.

A team-oriented open source password manager with a focus on transparency, usability and security. A team-oriented open source password manager with a focus on transparency, usability and security. SCRT Who am I? Florian Gaultier Security engineer in charge of SCRT France I break things for a living,

More information

New Features in EJB 3.1

New Features in EJB 3.1 New Features in EJB 3.1 Sangeetha S E-Commerce Research Labs, Infosys Technologies Limited 2010 Infosys Technologies Limited Agenda New Features in EJB 3.1 No Interface View EJB Components in WAR Singleton

More information

School of Computer Science CPS109 Course Notes 5 Alexander Ferworn Updated Fall 15

School of Computer Science CPS109 Course Notes 5 Alexander Ferworn Updated Fall 15 Table of Contents 1 INTRODUCTION... 1 2 IF... 1 2.1 BOOLEAN EXPRESSIONS... 3 2.2 BLOCKS... 3 2.3 IF-ELSE... 4 2.4 NESTING... 5 3 SWITCH (SOMETIMES KNOWN AS CASE )... 6 3.1 A BIT ABOUT BREAK... 7 4 CONDITIONAL

More information

Painless Persistence. Some guidelines for creating persistent Java applications that work

Painless Persistence. Some guidelines for creating persistent Java applications that work Painless Persistence Some guidelines for creating persistent Java applications that work The Authors Anthony Patricio Senior JBoss Certification Developer Highest volume poster on early Hibernate forums

More information

Android Application Development using Kotlin

Android Application Development using Kotlin Android Application Development using Kotlin 1. Introduction to Kotlin a. Kotlin History b. Kotlin Advantages c. How Kotlin Program Work? d. Kotlin software Prerequisites i. Installing Java JDK and JRE

More information

Module 8 The Java Persistence API

Module 8 The Java Persistence API Module 8 The Java Persistence API Objectives Describe the role of the Java Persistence API (JPA) in a Java EE application Describe the basics of Object Relational Mapping Describe the elements and environment

More information

PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 00. WELCOME TO OBJECTVILLE. Speaking the Language of OO

PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 00. WELCOME TO OBJECTVILLE. Speaking the Language of OO PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 00. WELCOME TO OBJECTVILLE Speaking the Language of OO COURSE INFO Instructor : Alper Bilge TA : Gökhan Çıplak-Ahmet Alkılınç Time : Tuesdays 2-5pm Location

More information

Goals for Today. CSE1030 Introduction to Computer Science II. CSE1030 Lecture #9. Review is-a versus has-a. Lecture #9 Inheritance I

Goals for Today. CSE1030 Introduction to Computer Science II. CSE1030 Lecture #9. Review is-a versus has-a. Lecture #9 Inheritance I CSE1030 Introduction to Computer Science II Lecture #9 Inheritance I Goals for Today Today we start discussing Inheritance (continued next lecture too) This is an important fundamental feature of Object

More information

Learning to love release notes

Learning to love release notes Learning to love release notes Anne Edwards Write the Docs 2018 anne@improbable.io Who am I? technical writer for nearly four years three different companies - currently working at Improbable long-form

More information

Java Enterprise Edition

Java Enterprise Edition Java Enterprise Edition The Big Problem Enterprise Architecture: Critical, large-scale systems Performance Millions of requests per day Concurrency Thousands of users Transactions Large amounts of data

More information

SELF-AWARE APPLICATIONS AUTOMATIC PRODUCTION DIAGNOSIS DINA GOLDSHTEIN

SELF-AWARE APPLICATIONS AUTOMATIC PRODUCTION DIAGNOSIS DINA GOLDSHTEIN SELF-AWARE APPLICATIONS AUTOMATIC PRODUCTION DIAGNOSIS DINA GOLDSHTEIN Agenda Motivation Hierarchy of self-monitoring CPU profiling GC monitoring Heap analysis Deadlock detection 2 Agenda Motivation Hierarchy

More information

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device.

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device. Let's get started! Start Studio We might have a bit of work to do here Create new project Let's give it a useful name Note the traditional convention for company/package names We don't need C++ support

More information

Sharpen your pencil. entity bean synchronization

Sharpen your pencil. entity bean synchronization Using the interfaces below, write a legal bean class. You don t have to write the actual business logic, but at least list all the methods that you have to write in the class, with their correct declarations.

More information

What is a Function? What are functions good for?

What is a Function? What are functions good for? Functions What is a Function? What is a Function? Up until this point, every line of code we've shown you has done a simple task, such as performing an arithmetic operation, or checking a boolean condition,

More information

COMP390 (Design &) Implementation

COMP390 (Design &) Implementation COMP390 (Design &) Implementation A rough guide Consisting of some ideas to assist the development of large and small projects in Computer Science (With thanks to Dave Shield) Design & Implementation What

More information

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)...

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)... Remembering numbers (and other stuff)... Let s talk about one of the most important things in any programming language. It s called a variable. Don t let the name scare you. What it does is really simple.

More information

Voice. The lost piece of the BYOD puzzle.

Voice. The lost piece of the BYOD puzzle. Voice. The lost piece of the BYOD puzzle. Contents: What s wrong with BYOD? 3 The issue of intimacy 4 How voice got left out of the picture 5 Why voice will always be big for business 6 Introducing smartnumbers

More information

Project Report. Team 233. Hongnian Yu, Dong Liang, Tianlei Sun, Jian Zhu California Institute of Technology Department of Electrical Engineering

Project Report. Team 233. Hongnian Yu, Dong Liang, Tianlei Sun, Jian Zhu California Institute of Technology Department of Electrical Engineering Project Report Team 233 Hongnian Yu, Dong Liang, Tianlei Sun, Jian Zhu California Institute of Technology Department of Electrical Engineering 1 Team Member & Work Split Group members: Hongnian Yu, Dong

More information

CSCI-1200 Data Structures Fall 2011 Lecture 24 Garbage Collection & Smart Pointers

CSCI-1200 Data Structures Fall 2011 Lecture 24 Garbage Collection & Smart Pointers CSCI-1200 Data Structures Fall 2011 Lecture 24 Garbage Collection & Smart Pointers Review from Lecture 23 Basic exception mechanisms: try/throw/catch Functions & exceptions, constructors & exceptions Today

More information

Credit where Credit is Due. Lecture 25: Refactoring. Goals for this lecture. Last Lecture

Credit where Credit is Due. Lecture 25: Refactoring. Goals for this lecture. Last Lecture Credit where Credit is Due Lecture 25: Refactoring Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2002 Some of the material for this lecture and lecture 26 is taken

More information

E-Guide WHAT WINDOWS 10 ADOPTION MEANS FOR IT

E-Guide WHAT WINDOWS 10 ADOPTION MEANS FOR IT E-Guide WHAT WINDOWS 10 ADOPTION MEANS FOR IT E nterprise adoption of Windows 10 isn t likely to follow the same pattern as for Windows 7, and that s a good thing, writes columnist Brian Madden. And even

More information

Classes, interfaces, & documentation. Review of basic building blocks

Classes, interfaces, & documentation. Review of basic building blocks Classes, interfaces, & documentation Review of basic building blocks Objects Data structures literally, storage containers for data constitute object knowledge or state Operations an object can perform

More information

Developing RESTful Services in Java

Developing RESTful Services in Java Developing RESTful Services in Java Version 1.1 Instructor s Guide Overview We begin this course, as we do all our Java web services courses these days, with a twochapter overview of web services and the

More information

Science-as-a-Service

Science-as-a-Service Science-as-a-Service The iplant Foundation Rion Dooley Edwin Skidmore Dan Stanzione Steve Terry Matthew Vaughn Outline Why, why, why! When duct tape isn t enough Building an API for the web Core services

More information

Taskbar: Working with Several Windows at Once

Taskbar: Working with Several Windows at Once Taskbar: Working with Several Windows at Once Your Best Friend at the Bottom of the Screen How to Make the Most of Your Taskbar The taskbar is the wide bar that stretches across the bottom of your screen,

More information

ICOM 4015-Advanced Programming. Spring Instructor: Dr. Amir H. Chinaei. TAs: Hector Franqui, Jose Garcia, and Antonio Tapia. Reference: Big Java

ICOM 4015-Advanced Programming. Spring Instructor: Dr. Amir H. Chinaei. TAs: Hector Franqui, Jose Garcia, and Antonio Tapia. Reference: Big Java ICOM 4015-Advanced Programming Spring 2014 Instructor: Dr. Amir H. Chinaei TAs: Hector Franqui, Jose Garcia, and Antonio Tapia Reference: Big Java By Hortsmann, Ed 4 Lab 7 Continuation of HTTP and Introduction

More information

Clickteam Fusion 2.5 Creating a Debug System - Guide

Clickteam Fusion 2.5 Creating a Debug System - Guide INTRODUCTION In this guide, we will look at how to create your own 'debug' system in Fusion 2.5. Sometimes when you're developing and testing a game, you want to see some of the real-time values of certain

More information

Clickbank Domination Presents. A case study by Devin Zander. A look into how absolutely easy internet marketing is. Money Mindset Page 1

Clickbank Domination Presents. A case study by Devin Zander. A look into how absolutely easy internet marketing is. Money Mindset Page 1 Presents A case study by Devin Zander A look into how absolutely easy internet marketing is. Money Mindset Page 1 Hey guys! Quick into I m Devin Zander and today I ve got something everybody loves! Me

More information

Introduction. A Brief Description of Our Journey

Introduction. A Brief Description of Our Journey Introduction If you still write RPG code as you did 20 years ago, or if you have ILE RPG on your resume but don t actually use or understand it, this book is for you. It will help you transition from the

More information

Software System/Design & Architecture. Eng.Muhammad Fahad Khan Assistant Professor Department of Software Engineering

Software System/Design & Architecture. Eng.Muhammad Fahad Khan Assistant Professor Department of Software Engineering Software System/Design & Architecture Eng.Muhammad Fahad Khan Assistant Professor Department of Software Engineering Todays lecture Model View Controller (MVC) Copyright 2012 @ M.Fahad Khan 2 Model-View-Controller

More information

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition CMP 436/774 Introduction to Java Enterprise Edition Fall 2013 Department of Mathematics and Computer Science Lehman College, CUNY 1 Java Enterprise Edition Developers today increasingly recognize the need

More information

COMP390 (Design &) Implementation

COMP390 (Design &) Implementation COMP390 (Design &) Implementation Phil (& Dave s) rough guide Consisting of some ideas to assist the development of large and small projects in Computer Science (and a chance for me to try out some features

More information

Initial Thoughts III-2 III-2 III-2 III-2 III-2 III-2

Initial Thoughts III-2 III-2 III-2 III-2 III-2 III-2 RJ2EE.III-2 (215-230) 12/5/02 10:22 AM Page 215 III-2 III-2 III-2 III-2 III-2 III-2 Initial Thoughts Now that Bongo had the green light to continue work with the Joe-to-Go (JTG) project, there was an enormous

More information

PRO SWIFT BOOK AND VIDEOS M A S E. Break out of beginner s Swift. with this hands-on guide

PRO SWIFT BOOK AND VIDEOS M A S E. Break out of beginner s Swift. with this hands-on guide PRO SWIFT BOOK AND VIDEOS Break out of beginner s Swift E L P with this hands-on guide M A S E E Paul Hudson R F Chapter 1 Syntax Wendy Lu (@wendyluwho), ios engineer at Pinterest Use final on properties

More information

8.3 cloud roadmap. Dr. Andrei Borshchev, CEO Nikolay Churkov, Head of Software Development. The AnyLogic Company Conference 2018 Baltimore

8.3 cloud roadmap. Dr. Andrei Borshchev, CEO Nikolay Churkov, Head of Software Development. The AnyLogic Company Conference 2018 Baltimore 8.3 cloud roadmap Dr. Andrei Borshchev, CEO Nikolay Churkov, Head of Software Development The AnyLogic Company Conference 2018 Baltimore The AnyLogic Company www.anylogic.com agenda 1. 8.3: the new web

More information

Delivering Rich Internet Applications with Ajax4jsf

Delivering Rich Internet Applications with Ajax4jsf Delivering Rich Internet Applications with Ajax4jsf Modern Web 2.0 applications set a new level of expectations for enterprises on the Web. Developers face heightened requirements for richer user interfaces

More information

BDD and Testing. User requirements and testing are tightly coupled

BDD and Testing. User requirements and testing are tightly coupled BDD and Testing User requirements and testing are tightly coupled 1 New Concept: Acceptance Tests Customer criteria for accepting a milestone Get paid if pass! Black-box tests specified with the customer

More information

What did we talk about last time? Course overview Policies Schedule

What did we talk about last time? Course overview Policies Schedule Week 1 - Wednesday What did we talk about last time? Course overview Policies Schedule The book talks about stuff that you know pretty well as Java programmers I just want to talk about a few issues

More information

MITOCW watch?v=w_-sx4vr53m

MITOCW watch?v=w_-sx4vr53m MITOCW watch?v=w_-sx4vr53m The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

The Design Patterns Matrix From Analysis to Implementation

The Design Patterns Matrix From Analysis to Implementation The Design Patterns Matrix From Analysis to Implementation This is an excerpt from Shalloway, Alan and James R. Trott. Design Patterns Explained: A New Perspective for Object-Oriented Design. Addison-Wesley

More information

Asynchronous OSGi: Promises for the masses. Tim Ward.

Asynchronous OSGi: Promises for the masses. Tim Ward. Asynchronous OSGi: Promises for the masses Tim Ward http://www.paremus.com info@paremus.com Who is Tim Ward? @TimothyWard Senior Consulting Engineer, Trainer and Architect at Paremus 5 years at IBM developing

More information

Chris Buckett. FOREWORD BY Seth Ladd MANNING 6$03/(&+$37(5

Chris Buckett. FOREWORD BY Seth Ladd MANNING 6$03/(&+$37(5 Chris Buckett FOREWORD BY Seth Ladd 6$03/(&+$37(5 MANNING Dart in Action by Chris Buckett Chapter 9 Copyright 2013 Manning Publications brief contents PART 1 INTRODUCING DART...1 1 Hello Dart 3 2 Hello

More information

Basic Keywords Practice Session

Basic Keywords Practice Session Basic Keywords Practice Session Introduction In this article from my free Java 8 course, we will apply what we learned in my Java 8 Course Introduction to our first real Java program. If you haven t yet,

More information