Monday, May 12, 2014

Creating a SOAP Web Service


1. Create the Java class with methods you want to be converted as web service
2. Add a WebService annotation to the class
3. Add WebMethod annotation to the web service method. This is optional. All public methods of the web service class are automatically considered a web service method.

Example:
@WebService
public class BookStore{
@WebMethod
 public List<String> getBookNames() {
 }
}
This will create a web service class called BookStoreService.

Wednesday, May 7, 2014

Consuming a Web Service

What you need:
- wsdl source

1. Use wsimport tool from java se. In command line enter:
wsimport -keep -s , e.g. wsimport -keep -s src
-keep - keep generated files (.java files)

2. Import the the java files in your project and use them as stubs to call the webservice method(s). The name of the stub you can use can be found in the wsdl:service tag of the wsdl.
Ex.
 name="CurrencyConvertor">

CurrencyConvertor cc = new CurrencyConvertor();
CurrencyConvertorSoap ccs = cc.getCurrencyConvertorSoap();




Thursday, April 17, 2014

Scrum

Scrum

 - one of the best Agile practices

Product back log

 - user stories/wish list

Roles

  • product owner - chooses what to deliver from product back log
  • scrum master - similar to PM
  • developers
  • testers
  • customers
  • executives

Release planning

  • release backlog with estimates
    estimate by story point
    estimate by hour - 1, 2, 4, 8 hours or 2, 3, 5, 10 days or 1, 2 , 3, 6 months
  • sprints - short duration milestones (2 to 30 days) - > ship ready state
  • burndown chart - work remaining by time(day) chart
    burndown velocity - ave. rate of productivity, slope
  • sprint backlog
  • daily scrum - stand up meetings, completed tasks & obstacles
  • sprint restrospective - what went right? and what went wrong/areas of improvement?

Software Development Methodologies

A software development methodology or system development methodology in software engineering is a framework that is used to structure, plan, and control the process of developing an information system. 

Broadly these are:
  1. Software development life cycle methodology
  2. Agile methodology 

There are many models under these methodologies
  1. Software development life cycle:
    • Waterfall: a linear framework 
    • Spiral: a combined linear-iterative framework 
    • Incremental: a combined linear-iterative framework or V Model 
    • Prototyping: an iterative framework 
    • Rapid application development (RAD): an iterative framework
  2. Agile methodology:
    • Scrum 
    • Extreme programming
    • Adaptive software development (ASD) 
    • Dynamic system development method (DSDM)
Sources:
http://www.itinfo.am/eng/software-development-methodologies
http://en.wikipedia.org/wiki/Software_development_methodology

Saturday, April 12, 2014

GlassFish Basics

domain1
- default domain created during installation of GlassFish
- {glassfish.dir}/glassfish/domains/domain1

Start/stop of server
- in {glassfish.dir}/bin run command: asadmin start-domain or asadmin stop-domain

Console
- http://localhost:4848/




Thursday, January 16, 2014

Getting Started with Apache Tomcat

Requirements:

  • compatible JDK

Steps:

  1. Download Tomcat at http://tomcat.apache.org/download-60.cgi
  2. Install Tomcat. http://tomcat.apache.org/tomcat-6.0-doc/setup.html
    Complete Intructions: see RUNNING.txt
    Environment variables to set:
    CATALINA_HOME - location of root directory of Tomcat bin
         - Ex. CATALINA_HOME=C:\Apps\apache-tomcat-6.0.37
    CATALINA_BASE - location of active Tomcat, defaults to CATALINA_HOME
    JRE_HOME or JAVA_HOME - If both JRE_HOME and JAVA_HOME are specified, JRE_HOME is used.
         - Ex. JAVA_HOME=C:\Apps\Java\jdk150_15
  3. sdas
Source:
http://tomcat.apache.org

Friday, November 1, 2013

English Grammar Reminders

direct vs indirect object
Direct object is often part of the predicate and is what the verb is being done to. To identify the direct object ask the question: Subject + Verb + What/Whom?
Indirect object cannot exist without direct object. It answers the question: To/For/From whom?
Ex.
She gave some cookies. She + gave + what? >> cookies (the direct object)
She gave the kids some cookies.
   She + gave the kids + what? >> cookies (the direct object)
   To whom did she gave cookies? >> kids (indirect object)

transitive vs intransitive verb
Transitive verbs require direct object while intransitive verb does not.
Ex.
The child broke the glass. >> transitive, without "the glass", the sentence in incomplete
The child arrived. >> intransitive, does not need direct object
The child eats every afternoon. The child eats the cake. >> eats is both transitive and intransitive

I or me
The rules around the use of the pronouns ‘I’ and ‘me’ can be tricky. A simple way to test whether you’re using the right one is to think about whether a statement would still make sense if you removed the other person. You wouldn’t say, “The car beeped at I” so the correct pronoun is ‘me’.

apostrophe
Expressions of time are also known as ‘temporal expressions’. When used in temporal expressions, the apostrophe is placed before the ‘s’ for single units and after for multiple units.
Ex.
I will be 30 in two years’ time.
I will be 29 in one year’s time.

that or which
You can remove the clause containing ‘which’ from a sentence without changing the meaning. ‘That’, however, is necessary.
Ex.
Phones that have cameras are generally more expensive.
My bedroom, which is currently pink, needs painting.

fewer or less
If you can count the number of items (count nouns) use ‘fewer’. If not, you’re probably referring to mass nouns so use ‘less’. Time, money and distance are exceptions – use ‘less’ for these too. So even if you can count how many hours a meeting lasted for, you’d say, “The meeting lasted for less than two hours.”
Ex.
We need less furniture in this office.
Could we get by with fewer desks?

i.e. or e.g.
‘E.g.’ is used to give an example. ‘I.e.’ is used to give more information.
Some animals are really cute, e.g. kittens and puppies.
The primary colours ( i.e. red, yellow and blue) are my favorites.

who or whom
‘Whom’ is used when referring to the object of a sentence. Use ‘who’ when referring to the subject of a sentence. There’s a trick to help you remember: If you can answer with ‘he’, use ‘who’ (e.g. ‘he ate all the doughnuts’). If you can answer with ‘him’ use ‘whom’ (e.g. ‘I saw him at the bar’). Just remember that ‘him’ and ‘whom’ both end in the letter m.
Ex.
Whom did you see at the bar last night?
I can’t think who would have eaten all the doughnuts.

lay or lie
‘Lay’ requires a direct object (e.g. in the sentence above, the direct object is the table) and ‘lie’ does not.
Ex.
Why don’t you go and lie down?
I’m going to lay the book on the table.

bored of, bored by, or bored with
Although ‘of’ is commonly used after ‘bored’, this is technically incorrect. Always use ‘with’ or ‘by’ in formal writing.
Ex.
I’m bored with this.
I’m bored by math class.

may and might
“May” implies a possibility. “Might” implies far more uncertainty.
Ex.
“You may get drunk if you have two shots in ten minutes” implies a real possibility of drunkenness.
“You might get a ticket if you operate a tug boat while drunk” implies a possibility that is far more remote.

farther and further
The word “farther” implies a measurable distance. “Further” should be reserved for abstract lengths you can't always measure.
Ex.
I threw the ball ten feet farther than Bill.
The financial crisis caused further implications.

since and because
“Since” refers to time. “Because” refers to causation.
Ex.
Since I quit drinking I’ve married and had two children.
Because I quit drinking I no longer wake up in my own vomit.

disinterested and uninterested
Contrary to popular usage, these words aren’t synonymous. A “disinterested” person is someone who’s impartial. For example, a hedge fund manager might take interest in a headline regarding the performance of a popular stock, even if he's never invested in it. He’s “disinterested,” i.e., he doesn’t seek to gain financially from the transaction he’s witnessed. Judges and referees are supposed to be "disinterested." If the sentence you’re using implies someone who couldn't care less, chances are you’ll want to use “uninterested.”

anxious
Unless you’re frightened of them, you shouldn't say you’re “anxious to see your friends.” You’re actually “eager,” or "excited." To be “anxious” implies a looming fear, dread or anxiety. It doesn’t mean you’re looking forward to something.

different than and different from
The adjective “different” is used to draw distinction. So, when “different” is followed by a  preposition, it should be “from,” similar to “separate from,” “distinct from,” or “away from.” There are rare cases where “different than” is appropriate, if “than” operates as a conjunction. When in doubt, use “different from.”
Ex.
My living situation in New York was different from home.
Development is different in New York than in Los Angeles.

bring and take
In order to employ proper usage of “bring” or “take,” the writer must know whether the object is being moved toward or away from the subject. If it is toward, use “bring.” If it is away, use “take.” Your spouse may tell you to “take your clothes to the cleaners.” The owner of the dry cleaners would say “bring your clothes to the cleaners.”

affect and effect
“Affect” is almost always a verb (e.g., Facebook affects people’s attention spans), and “effect” is almost always a noun (e.g., Facebook's effects can also be positive). There are some exceptions. “Effect” may be used as a transitive verb, which means to bring about or make happen. e.g., My new computer effected a much-needed transition from magazines to Web porn. There are similarly rare examples where “affect” can be a noun. e.g., His lack of affect made him seem like a shallow person.

irony and coincidence
Too many people claim something is the former when they actually mean the latter. For example, it’s not “ironic” that “Barbara moved from California to New York, where she ended up meeting and falling in love with a fellow Californian.” The fact that they’re both from California is a "coincidence." "Irony" is the incongruity in a series of events between the expected results and the actual results. "Coincidence" is a series of events that appear planned when they’re actually accidental. So, it would be "ironic" if “Barbara moved from California to New York to escape California men, but the first man she ended up meeting and falling in love with was a fellow Californian.”

nauseous vs nauseated
Undoubtedly the most common mistake I encounter. Contrary to almost ubiquitous misuse, to be “nauseous” doesn't mean you've been sickened: it actually means you possess the ability to produce nausea in others. e.g., That week-old hot dog is nauseous. When you find yourself disgusted or made ill by a nauseating agent, you are actually “nauseated.” e.g., I was nauseated after falling into that dumpster behind the Planned Parenthood.

Source:
http://m.staples.ca/sbdca/en_CA/cre/programs/grammarquiz/
http://litreactor.com/columns/20-common-grammar-mistakes-that-almost-everyone-gets-wrong