SlideShare a Scribd company logo
1 of 114
Groovy: Efficiency Oriented Programming
Lecture 10
Master Proteomics & Bioinformatics - University of Geneva
Alexandre Masselot - summer 2011
Agenda

‣ SVN & google code hosting
‣ More on GSP
‣ Including third parties libraries
‣ Ajax
‣ Runtime environment
‣ Domains
SCM

‣ Code evolve in time
SCM

‣ Code evolve in time
‣ Source code is shared
SCM

‣ Code evolve in time
‣ Source code is shared
‣ Source Code Management system host code + versioning
SCM

‣ Code evolve in time
‣ Source code is shared
‣ Source Code Management system host code + versioning
‣ Many solutions exist: CVS, SVN, GIT, SourceSafe...
SCM

‣ Code evolve in time
‣ Source code is shared
‣ Source Code Management system host code + versioning
‣ Many solutions exist: CVS, SVN, GIT, SourceSafe...
‣ SVN is a client/server solution
SCM

‣ Code evolve in time
‣ Source code is shared
‣ Source Code Management system host code + versioning
‣ Many solutions exist: CVS, SVN, GIT, SourceSafe...
‣ SVN is a client/server solution
‣ Server can be in-house
SCM

‣ Code evolve in time
‣ Source code is shared
‣ Source Code Management system host code + versioning
‣ Many solutions exist: CVS, SVN, GIT, SourceSafe...
‣ SVN is a client/server solution
‣ Server can be in-house
‣ Free solution for open source
 http://code.google.com/hosting/
make an google account
Create Project
Project name: geop-demo

Project summary: A demo project for GEOP course

Project description: geop demo code
Version control system: Subversion

Source code license:  New BSD License

Use a separate content license:
license...

Project labels:

Create project...

Project name must start with a lowercase letter, followed by lowercase letters, digits, and dashes, with no
spaces. This will be part of your project's URL and cannot be changed later.
Project summary will be shown whenever the project's name is displayed.
Project description is the main content of your project's home page. You may use wiki markup.
Version control system selects the type of your project's repository. Learn more.
Licenses determine how others may build upon your work. Code and documentation may be distributed under
separate licenses.
Project labels help classify your project so others can easily find it or browse projects by label.
Google proposes command line commands
We’ll see how to integrate svn into eclipse
Command-line access

If you plan to make changes, use this command to check out the code as yourself using HTTPS:


# Project members authenticate over HTTPS to allow committing changes.
svn checkout https://geop-demo.googlecode.com/svn/trunk/ geop-demo --username alexandre.masselot

When prompted, enter your generated googlecode.com password.


Use this command to anonymously check out the latest project source code:


# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://geop-demo.googlecode.com/svn/trunk/ geop-demo-read-only



GUI and IDE access

This project's Subversion repository may be accessed using many different client programs and plug-ins. See your client's
documentation for more information.
Google code offers for “free”

‣ SVN repository
Google code offers for “free”

‣ SVN repository
‣ Managing contributors to a project
Google code offers for “free”

‣ SVN repository
‣ Managing contributors to a project
‣ Wiki
Google code offers for “free”

‣ SVN repository
‣ Managing contributors to a project
‣ Wiki
‣ Ticketing system
Google code offers for “free”

‣ SVN repository
‣ Managing contributors to a project
‣ Wiki
‣ Ticketing system
‣ Bug reporting
Google code offers for “free”

‣ SVN repository
‣ Managing contributors to a project
‣ Wiki
‣ Ticketing system
‣ Bug reporting
‣ Visibility
Google code hosting
           ⇒
your code is open source
SVN: eclipse or command line
Installing svn in Eclipse

‣ Help > dashboard > extension
  - Subversion (subclipse)
Installing svn in Eclipse

‣ Help > dashboard > extension
  - Subversion (subclipse)

‣ Or command line: installed by default or
  - sudo apt-get install subversion
Eclipse: connecting to the SVN repository

‣ menu Window
  - > open perspective
  - > SVN repository exploring
Eclipse: connecting to the SVN repository

‣ menu Window
  - > open perspective
  - > SVN repository exploring

‣ view SVN repositories
  - > right click
  - > new repository location
  - https://geop-demo.googlecode.com/svn
Sharing an existing project to your google code account
Sharing an existing project to your google code account

‣ Perspective java
Sharing an existing project to your google code account

‣ Perspective java
‣ project right-click
  - > team
  - > share project
  - use specifier folder name
    trunk/your.project.name
‣ username & password
 from google page
‣ save password
 check box
Commit the project

‣ At this stage, the project is only created on the remote server
  - check with SVN repository exploring perspective
  - or browse source code from google page
Commit the project

‣ At this stage, the project is only created on the remote server
  - check with SVN repository exploring perspective
  - or browse source code from google page

‣ Mark generated file & folder to be ignored from svn
  - e.g. target/
Commit the project

‣ At this stage, the project is only created on the remote server
  - check with SVN repository exploring perspective
  - or browse source code from google page

‣ Mark generated file & folder to be ignored from svn
  - e.g. target/

‣ Right-click > team > add to svn:ignore
All eclipse functionalities
can be replaced by shell commands
SVN command line: share project

‣ Import original project demo.svn to the repository
‣ cd workspace directory
 svn import -m “initial import” --non-recursive demo.svn
 https://geop-demo.googlecode.com/svn/trunk/demo.svn

‣ Directory itself is not imported, so checkout (with force)
 svn checkout --force https://geop-demo.googlecode.com/svn/
 trunk/demo.svn
SVN command line: share project                 (cont’d)

 cd demo.svn

‣ Add target/ directory to svn:ignore
 svn propset svn:ignore target .

‣ Add other directories to svn
 svn add $(ls | grep -v target)

‣ Commit files
 svn commit -m "adding all initial files"

‣ Back to eclipse, F5 (refresh in package explorer view)
Browse your project
From google code source page




                               25
SVN for a daily use
SVN for a daily use
        minutely
SVN: flow use

‣ Checkout out or share an existing project to contribute
SVN: flow use

‣ Checkout out or share an existing project to contribute
‣ Commit changes to the repository
SVN: flow use

‣ Checkout out or share an existing project to contribute
‣ Commit changes to the repository
‣ Update changes from repository
SVN: flow use

‣ Checkout out or share an existing project to contribute
‣ Commit changes to the repository
‣ Update changes from repository
‣ Eclipse:
  - select project
  - > right-click
  - > team
  - > Synchronize with repository
  - commit/update/manage conflict
SVN: flow use                                    (cont’d)

‣ Command line
svn status
svn update
svn commit -m “my message to describe changes”
Commit/update often
SVN is more

‣ History
SVN is more

‣ History
‣ See contribution from others
SVN is more

‣ History
‣ See contribution from others
‣ Tag / branch versions
SVN is more

‣ History
‣ See contribution from others
‣ Tag / branch versions
‣ Conflict resolution
SVN is more

‣ History
‣ See contribution from others
‣ Tag / branch versions
‣ Conflict resolution
‣ Continuous integration / testing on dedicated server
SVN is more

‣ History
‣ See contribution from others
‣ Tag / branch versions
‣ Conflict resolution
‣ Continuous integration / testing on dedicated server
‣ File locking :(
SVN is more

‣ History
‣ See contribution from others
‣ Tag / branch versions
‣ Conflict resolution
‣ Continuous integration / testing on dedicated server
‣ File locking :(
‣ Integration with tickets
SVN is more

‣ History
‣ See contribution from others
‣ Tag / branch versions
‣ Conflict resolution
‣ Continuous integration / testing on dedicated server
‣ File locking :(
‣ Integration with tickets
‣ Windows integration: http://tortoisesvn.tigris.org/
Back to grails... and proteins isoforms
Problem: uniprot AC ➙ isoform list
       in a web application
Grails: including a third parties libraries

‣ Library is available as a jar (export ➙ .jar)
Grails: including a third parties libraries

‣ Library is available as a jar (export ➙ .jar)
‣ Copy jar in lib/
Grails: including a third parties libraries

‣ Library is available as a jar (export ➙ .jar)
‣ Copy jar in lib/
‣ For eclipse completion
  - right-click
  - build path
  - add to build path
Get is forms for ac (00:44:01.975)
Q70Z44
List
>Q70Z44-1
MQKHSPGPPALALLSQSLLTTGNGDTLIINCPGFGQHRVDPAAFQAVFDRKAIGPVTNYS
VATHVNISFTLSAIWNCYSRIHTFNCHHARPWHNQFVQWNPDECGGIKKSGMATENLWLS
DVFIEESVDQTPAGLMASMSIVKATSNTISQCGWSASANWTPSISPSMDRARAWRRMSRS
FQIHHRTSFRTRREWVLLGIQKRTIKVTVATNQYEQAIFHVAIRRRCRPSPYVVNFLVPS
GILIAIDALSFYLPLESGNCAPFKMTVLLGYSVFLLMMNDLLPATSTSSHASLVAPLALM
QTPLPAGVYFALCLSLMVGSLLETIFITHLLHVATTQPLPLPRWLHSLLLHCTGQGRCCP
TAPQKGNKGPGLTPTHLPGVKEPEVSAGQMPGPGEAELTGGSEWTRAQREHEAQKQHSVE
LWVQFSHAMDALLFRLYLLFMASSIITVICLWNT


>Q70Z44-2
MASMSIVKATSNTISQCGWSASANWTPSISPSMDRAERSPSALSPTQVAIRRRCRPSPYV
VNFLVPSGILIAIDALSFYLPLESGNCAPFKMTVLLGYSVFLLMMNDLLPATSTSSHASL
VRPHPSRDQKRGVYFALCLSLMVGSLLETIFITHLLHVATTQPLPLPRWLHSLLLHCTGQ
GRCCPTAPQKGNKGPGLTPTHLPGVKEPEVSAGQMPGPGEAELTGGSEWTRAQREHEAQK
QHSVELWVQFSHAMDALLFRLYLLFMASSIITVICLWNT
Isoforms_v1 -> v5 same controller
        different views (gsp)
 for different rendering interaction
Isoforms_v1 -> v5 same controller
        different views (gsp)
 for different rendering interaction
Isoforms_vXController
                  ⇒
views/isoforms_vX/ direcgtory with gsp’s
IsoformController_v?.groovy


 def list = {

 
 def ac=params.ac

 

 
 def xml=new XmlSlurper()
             .parseText("http://pir.uniprot.org/uniprot/$
{ac}.xml".toURL().text).entry

 
 UniprotEntrySplicer splicer=[entryXml:xml]

 
     def proteins=splicer.buildAllIsoforms().values() as
List


 
   [proteins: proteins]

 }
v1
isoforms_v1/list.gsp

<html>
  <body>
    <h2>Get is forms for ac (${String.format('%tH:%<tM:
%<tS.%<tL', new Date())})</h2>
    <g:form action="list">
      <g:textField name="ac" value="${params.ac}" />
      <g:submitButton name="submit" />
    </g:form>

    <h3>List</h3>
    <g:each in="${proteins}" var="prot">
        <pre>
  ${prot}
        </pre>
    </g:each>
  </body>
</html>
Problem: direct access to /list only
v2
v2
isoforms_v2: add index.gsp

<html>
  <body>
    <h1>Isoform list application</h1>
    <h2>Get is forms for ac (${String.format('%tH:%<tM:
%<tS.%<tL', new Date())})</h2>
    <g:form action="list">
      <g:textField name="ac" value="${params.ac}" />
      <g:submitButton name="submit" />
    </g:form>
  </body>
</html>
Problem: <g:form> is duplicated (DRY!)
isoform_v3: use template

‣ _form.gsp
<h2>Get is forms for ac (${String.format('%tH:%<tM:%<tS.
%<tL', new Date())})</h2>
<g:form action="list">
  <g:textField name="ac" value="${params.ac}" />
  <g:submitButton name="submit" />
</g:form>
isoform_v3: use template

‣ _form.gsp
<h2>Get is forms for ac (${String.format('%tH:%<tM:%<tS.
%<tL', new Date())})</h2>
<g:form action="list">
  <g:textField name="ac" value="${params.ac}" />
  <g:submitButton name="submit" />
</g:form>

‣ In index.gsp and list.gsp
     <g:render template="form" />
isoform_v3: use template

‣ _form.gsp
<h2>Get is forms for ac (${String.format('%tH:%<tM:%<tS.
%<tL', new Date())})</h2>
<g:form action="list">
  <g:textField name="ac" value="${params.ac}" />
  <g:submitButton name="submit" />
</g:form>

‣ In index.gsp and list.gsp
     <g:render template="form" />
Problem: all the page is reloaded totally
v4
Ajax: asynchronous load

                          web browser


Q70Z44           submit                        server

                                        isoform/list




                                                    47
Ajax: asynchronous load

                          web browser


Q70Z44           submit                        server

                                        isoform/list




                                                    47
Ajax: asynchronous load

                                            web browser


Q70Z44                         submit                                 server

List                                                           isoform/list
>Q70Z44-1
MQKHSPGPPALALLSQSLLTTGNGDTLIINCPGFGQHRVDPAAFQAVFDRKAIGPVTNYS
VATHVNISFTLSAIWNCYSRIHTFNCHHARPWHNQFVQWNPDECGGIKKSGMATENLWLS
DVFIEESVDQTPAGLMASMSIVKATSNTISQCGWSASANWTPSISPSMDRARAWRRMSRS
FQIHHRTSFRTRREWVLLGIQKRTIKVTVATNQYEQAIFHVAIRRRCRPSPYVVNFLVPS
GILIAIDALSFYLPLESGNCAPFKMTVLLGYSVFLLMMNDLLPATSTSSHASLVAPLALM
QTPLPAGVYFALCLSLMVGSLLETIFITHLLHVATTQPLPLPRWLHSLLLHCTGQGRCCP
TAPQKGNKGPGLTPTHLPGVKEPEVSAGQMPGPGEAELTGGSEWTRAQREHEAQKQHSVE
LWVQFSHAMDALLFRLYLLFMASSIITVICLWNT

>Q70Z44-2
MASMSIVKATSNTISQCGWSASANWTPSISPSMDRAERSPSALSPTQVAIRRRCRPSPYV
VNFLVPSGILIAIDALSFYLPLESGNCAPFKMTVLLGYSVFLLMMNDLLPATSTSSHASL
VRPHPSRDQKRGVYFALCLSLMVGSLLETIFITHLLHVATTQPLPLPRWLHSLLLHCTGQ
GRCCPTAPQKGNKGPGLTPTHLPGVKEPEVSAGQMPGPGEAELTGGSEWTRAQREHEAQK
QHSVELWVQFSHAMDALLFRLYLLFMASSIITVICLWNT



                                                                           47
isoform_v4/index.gsp

<html>
  <head>
    <g:javascript library="prototype" />
  </head>
  <body>
    <h2>Get is forms for ac (${String.format('%tH:%<tM:
%<tS.%<tL', new Date())})</h2>
    <!-- g:formRemote stands for an ajax form -->
    <g:formRemote name="listForm" url="[action:'list']"
update="isoforms-list">
      <g:textField name="ac" value="${params.ac}" />
      <g:submitButton name="submit" />
    </g:formRemote>

    <!-- the target element of the form -->
    <div id="isoforms-list"/>
  </body>
</html>
isoform_v4/list.gsp

<h3>List</h3>
<g:each in="${proteins}" var="prot">
  <pre>
${prot}
   </pre>
</g:each>
Twitter 1
People post messages and follow others
database (domain)
+ controller (actions)
   + views (web)
Domain: Person & Message
Domain: bean definition + database storage
Person domain

‣ Create the database entry + bean class
       grails create-domain-class Person
 project > right-click > grails > create-domain-class
         Person
Person domain

‣ Create the database entry + bean class
       grails create-domain-class Person
 project > right-click > grails > create-domain-class
         Person

‣ Files created:
 ./grails-app/domain/eop/lec10/twitter/Person.groovy
 ./test/unit/eop/lec10/twitter/PersonTests.groovy
Person.groovy

‣ Created class
 package eop.lec10.twitter

 class Person {




     static constraints = {
     }
 }
Person.groovy
Person.groovy

‣ Enriched with fields
 package eop.lec10.twitter

 class Person {
     String username
     String firstName
     String lastName
     String email
     Date dateCreated

     static constraints = {
     }
 }
run-app ⇒ database + table created
Web access: need controller + views
Scaffolding is pure magic
PersonController.groovy

create-controller Person
PersonController.groovy

create-controller Person

‣ grails-app/controller/PersonController.groovy:
package eop.lec10.twitter

class PersonController {

 def scaffold = true
}
PersonController.groovy

 create-controller Person

‣ grails-app/controller/PersonController.groovy:
 package eop.lec10.twitter

 class PersonController {
 
 def scaffold = true
 }

‣ scaffold generate all default action & view implicitely
PersonController.groovy

 create-controller Person

‣ grails-app/controller/PersonController.groovy:
 package eop.lec10.twitter

 class PersonController {
 
 def scaffold = true
 }

‣ scaffold generate all default action & view implicitely
http://localhost:8080/eop.lec10.twitter/person

‣ Default url is redirected on the list page
http://localhost:8080/eop.lec10.twitter/person

‣ Default url is redirected on the list page
http://localhost:8080/eop.lec10.twitter/person

‣ Entering a new Person lucky luke
http://localhost:8080/eop.lec10.twitter/person

‣ Entering a new Person lucky luke
http://localhost:8080/eop.lec10.twitter/person

‣ Entering a new Person lucky luke
http://localhost:8080/eop.lec10.twitter/person
http://localhost:8080/eop.lec10.twitter/person

‣ Back to list
  - view all
  - edit
  - delete
  - sort
Domain constraints
Person.groovy

class Person {
    String username
    String firstName
    String lastName
    String email
    Date dateCreated


     //firstName is compulsory

     //email field has an email format

     //username cannot be null, is unique and   is between 6
and   20 characters

     static constraints = {

 
    
 firstName(blank:false)

 
    
 email(email:true, blank:false)

 
    
 username(blank:false, unique:true,
                    matches:/w{6,20}/)

       }
}
Efficiency Oriented Programming with Groovy

More Related Content

What's hot

Cool JVM Tools to Help You Test
Cool JVM Tools to Help You TestCool JVM Tools to Help You Test
Cool JVM Tools to Help You TestSchalk Cronjé
 
Cool Jvm Tools to Help you Test - Aylesbury Testers Version
Cool Jvm Tools to Help you Test - Aylesbury Testers VersionCool Jvm Tools to Help you Test - Aylesbury Testers Version
Cool Jvm Tools to Help you Test - Aylesbury Testers VersionSchalk Cronjé
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and PracticeBo-Yi Wu
 
Build microservice with gRPC in golang
Build microservice with gRPC in golangBuild microservice with gRPC in golang
Build microservice with gRPC in golangTing-Li Chou
 
Idiomatic Gradle Plugin Writing - GradleSummit 2016
Idiomatic Gradle Plugin Writing - GradleSummit 2016Idiomatic Gradle Plugin Writing - GradleSummit 2016
Idiomatic Gradle Plugin Writing - GradleSummit 2016Schalk Cronjé
 
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Rajmahendra Hegde
 
Managing dependencies with gradle
Managing dependencies with gradleManaging dependencies with gradle
Managing dependencies with gradleLiviu Tudor
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle BuildAndres Almiray
 
GraphQL IN Golang
GraphQL IN GolangGraphQL IN Golang
GraphQL IN GolangBo-Yi Wu
 
Gradle plugins, take it to the next level
Gradle plugins, take it to the next levelGradle plugins, take it to the next level
Gradle plugins, take it to the next levelEyal Lezmy
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle BuildAndres Almiray
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++Daniele Pallastrelli
 
Let's go HTTPS-only! - More Than Buying a Certificate
Let's go HTTPS-only! - More Than Buying a CertificateLet's go HTTPS-only! - More Than Buying a Certificate
Let's go HTTPS-only! - More Than Buying a CertificateSteffen Gebert
 

What's hot (20)

groovy & grails - lecture 4
groovy & grails - lecture 4groovy & grails - lecture 4
groovy & grails - lecture 4
 
Cool JVM Tools to Help You Test
Cool JVM Tools to Help You TestCool JVM Tools to Help You Test
Cool JVM Tools to Help You Test
 
Cool Jvm Tools to Help you Test - Aylesbury Testers Version
Cool Jvm Tools to Help you Test - Aylesbury Testers VersionCool Jvm Tools to Help you Test - Aylesbury Testers Version
Cool Jvm Tools to Help you Test - Aylesbury Testers Version
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
Build microservice with gRPC in golang
Build microservice with gRPC in golangBuild microservice with gRPC in golang
Build microservice with gRPC in golang
 
Idiomatic Gradle Plugin Writing - GradleSummit 2016
Idiomatic Gradle Plugin Writing - GradleSummit 2016Idiomatic Gradle Plugin Writing - GradleSummit 2016
Idiomatic Gradle Plugin Writing - GradleSummit 2016
 
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
 
Rest, sockets em golang
Rest, sockets em golangRest, sockets em golang
Rest, sockets em golang
 
Managing dependencies with gradle
Managing dependencies with gradleManaging dependencies with gradle
Managing dependencies with gradle
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
GraphQL IN Golang
GraphQL IN GolangGraphQL IN Golang
GraphQL IN Golang
 
Gradle plugins, take it to the next level
Gradle plugins, take it to the next levelGradle plugins, take it to the next level
Gradle plugins, take it to the next level
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
Node.js cluster
Node.js clusterNode.js cluster
Node.js cluster
 
Everything as a code
Everything as a codeEverything as a code
Everything as a code
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
groovy & grails - lecture 2
groovy & grails - lecture 2groovy & grails - lecture 2
groovy & grails - lecture 2
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++
 
Let's go HTTPS-only! - More Than Buying a Certificate
Let's go HTTPS-only! - More Than Buying a CertificateLet's go HTTPS-only! - More Than Buying a Certificate
Let's go HTTPS-only! - More Than Buying a Certificate
 

Similar to Efficiency Oriented Programming with Groovy

Distributed Versioning Tools, BeJUG 2010
Distributed Versioning Tools, BeJUG 2010Distributed Versioning Tools, BeJUG 2010
Distributed Versioning Tools, BeJUG 2010Pursuit Consulting
 
Life of a Chromium Developer
Life of a Chromium DeveloperLife of a Chromium Developer
Life of a Chromium Developermpaproductions
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld PresentationDan Hinojosa
 
Open Source tools overview
Open Source tools overviewOpen Source tools overview
Open Source tools overviewLuciano Resende
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP DevelopersLorna Mitchell
 
Subversionn Introduction at SuperMondays 2009-09-01
Subversionn Introduction at SuperMondays 2009-09-01Subversionn Introduction at SuperMondays 2009-09-01
Subversionn Introduction at SuperMondays 2009-09-01Alex Kavanagh
 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best PracticesAshraf Fouad
 
Digital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 InformationDigital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 InformationMassimo Menichinelli
 
Develop FOSS project using Google Code Hosting
Develop FOSS project using Google Code HostingDevelop FOSS project using Google Code Hosting
Develop FOSS project using Google Code HostingNarendra Sisodiya
 
Deploying to DigitalOcean With GitHub Actions
Deploying to DigitalOcean With GitHub ActionsDeploying to DigitalOcean With GitHub Actions
Deploying to DigitalOcean With GitHub ActionsDigitalOcean
 
JavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemJavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemGilad Garon
 
Version control
Version controlVersion control
Version controlSean Hayes
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017MarcinStachniuk
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel developmentshalom938
 
Azure DevOps for JavaScript Developers
Azure DevOps for JavaScript DevelopersAzure DevOps for JavaScript Developers
Azure DevOps for JavaScript DevelopersSarah Dutkiewicz
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins PipelinesSteffen Gebert
 
Cluster management with Kubernetes
Cluster management with KubernetesCluster management with Kubernetes
Cluster management with KubernetesSatnam Singh
 
Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopigopinathkarangula
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingPhilip Johnson
 

Similar to Efficiency Oriented Programming with Groovy (20)

Distributed Versioning Tools, BeJUG 2010
Distributed Versioning Tools, BeJUG 2010Distributed Versioning Tools, BeJUG 2010
Distributed Versioning Tools, BeJUG 2010
 
Life of a Chromium Developer
Life of a Chromium DeveloperLife of a Chromium Developer
Life of a Chromium Developer
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
 
Open Source tools overview
Open Source tools overviewOpen Source tools overview
Open Source tools overview
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP Developers
 
Subversionn Introduction at SuperMondays 2009-09-01
Subversionn Introduction at SuperMondays 2009-09-01Subversionn Introduction at SuperMondays 2009-09-01
Subversionn Introduction at SuperMondays 2009-09-01
 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best Practices
 
Digital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 InformationDigital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 Information
 
Develop FOSS project using Google Code Hosting
Develop FOSS project using Google Code HostingDevelop FOSS project using Google Code Hosting
Develop FOSS project using Google Code Hosting
 
Deploying to DigitalOcean With GitHub Actions
Deploying to DigitalOcean With GitHub ActionsDeploying to DigitalOcean With GitHub Actions
Deploying to DigitalOcean With GitHub Actions
 
JavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemJavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control system
 
Version control
Version controlVersion control
Version control
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel development
 
Azure DevOps for JavaScript Developers
Azure DevOps for JavaScript DevelopersAzure DevOps for JavaScript Developers
Azure DevOps for JavaScript Developers
 
subversion.ppt
subversion.pptsubversion.ppt
subversion.ppt
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
 
Cluster management with Kubernetes
Cluster management with KubernetesCluster management with Kubernetes
Cluster management with Kubernetes
 
Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopi
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project Hosting
 

More from Alexandre Masselot

Offshoring software development in Switzerland: You can do it
Offshoring software development in Switzerland: You can do itOffshoring software development in Switzerland: You can do it
Offshoring software development in Switzerland: You can do itAlexandre Masselot
 
Dev Wednesday - Swiss Transport in Real Time: Tribulations in the Big Data Stack
Dev Wednesday - Swiss Transport in Real Time: Tribulations in the Big Data StackDev Wednesday - Swiss Transport in Real Time: Tribulations in the Big Data Stack
Dev Wednesday - Swiss Transport in Real Time: Tribulations in the Big Data StackAlexandre Masselot
 
Swiss Transport in Real Time: Tribulations in the Big Data Stack
Swiss Transport in Real Time: Tribulations in the Big Data StackSwiss Transport in Real Time: Tribulations in the Big Data Stack
Swiss Transport in Real Time: Tribulations in the Big Data StackAlexandre Masselot
 

More from Alexandre Masselot (9)

Offshoring software development in Switzerland: You can do it
Offshoring software development in Switzerland: You can do itOffshoring software development in Switzerland: You can do it
Offshoring software development in Switzerland: You can do it
 
Dev Wednesday - Swiss Transport in Real Time: Tribulations in the Big Data Stack
Dev Wednesday - Swiss Transport in Real Time: Tribulations in the Big Data StackDev Wednesday - Swiss Transport in Real Time: Tribulations in the Big Data Stack
Dev Wednesday - Swiss Transport in Real Time: Tribulations in the Big Data Stack
 
Swiss Transport in Real Time: Tribulations in the Big Data Stack
Swiss Transport in Real Time: Tribulations in the Big Data StackSwiss Transport in Real Time: Tribulations in the Big Data Stack
Swiss Transport in Real Time: Tribulations in the Big Data Stack
 
groovy & grails - lecture 8
groovy & grails - lecture 8groovy & grails - lecture 8
groovy & grails - lecture 8
 
groovy & grails - lecture 1
groovy & grails - lecture 1groovy & grails - lecture 1
groovy & grails - lecture 1
 
groovy & grails - lecture 11
groovy & grails - lecture 11groovy & grails - lecture 11
groovy & grails - lecture 11
 
groovy & grails - lecture 12
groovy & grails - lecture 12groovy & grails - lecture 12
groovy & grails - lecture 12
 
groovy & grails - lecture 7
groovy & grails - lecture 7groovy & grails - lecture 7
groovy & grails - lecture 7
 
groovy & grails - lecture 3
groovy & grails - lecture 3groovy & grails - lecture 3
groovy & grails - lecture 3
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Efficiency Oriented Programming with Groovy

  • 1. Groovy: Efficiency Oriented Programming Lecture 10 Master Proteomics & Bioinformatics - University of Geneva Alexandre Masselot - summer 2011
  • 2. Agenda ‣ SVN & google code hosting ‣ More on GSP ‣ Including third parties libraries ‣ Ajax ‣ Runtime environment ‣ Domains
  • 4. SCM ‣ Code evolve in time ‣ Source code is shared
  • 5. SCM ‣ Code evolve in time ‣ Source code is shared ‣ Source Code Management system host code + versioning
  • 6. SCM ‣ Code evolve in time ‣ Source code is shared ‣ Source Code Management system host code + versioning ‣ Many solutions exist: CVS, SVN, GIT, SourceSafe...
  • 7. SCM ‣ Code evolve in time ‣ Source code is shared ‣ Source Code Management system host code + versioning ‣ Many solutions exist: CVS, SVN, GIT, SourceSafe... ‣ SVN is a client/server solution
  • 8. SCM ‣ Code evolve in time ‣ Source code is shared ‣ Source Code Management system host code + versioning ‣ Many solutions exist: CVS, SVN, GIT, SourceSafe... ‣ SVN is a client/server solution ‣ Server can be in-house
  • 9. SCM ‣ Code evolve in time ‣ Source code is shared ‣ Source Code Management system host code + versioning ‣ Many solutions exist: CVS, SVN, GIT, SourceSafe... ‣ SVN is a client/server solution ‣ Server can be in-house ‣ Free solution for open source http://code.google.com/hosting/
  • 10. make an google account
  • 11.
  • 12. Create Project Project name: geop-demo Project summary: A demo project for GEOP course Project description: geop demo code Version control system: Subversion Source code license:  New BSD License Use a separate content license: license... Project labels: Create project... Project name must start with a lowercase letter, followed by lowercase letters, digits, and dashes, with no spaces. This will be part of your project's URL and cannot be changed later. Project summary will be shown whenever the project's name is displayed. Project description is the main content of your project's home page. You may use wiki markup. Version control system selects the type of your project's repository. Learn more. Licenses determine how others may build upon your work. Code and documentation may be distributed under separate licenses. Project labels help classify your project so others can easily find it or browse projects by label.
  • 13. Google proposes command line commands We’ll see how to integrate svn into eclipse
  • 14.
  • 15. Command-line access If you plan to make changes, use this command to check out the code as yourself using HTTPS: # Project members authenticate over HTTPS to allow committing changes. svn checkout https://geop-demo.googlecode.com/svn/trunk/ geop-demo --username alexandre.masselot When prompted, enter your generated googlecode.com password. Use this command to anonymously check out the latest project source code: # Non-members may check out a read-only working copy anonymously over HTTP. svn checkout http://geop-demo.googlecode.com/svn/trunk/ geop-demo-read-only GUI and IDE access This project's Subversion repository may be accessed using many different client programs and plug-ins. See your client's documentation for more information.
  • 16. Google code offers for “free” ‣ SVN repository
  • 17. Google code offers for “free” ‣ SVN repository ‣ Managing contributors to a project
  • 18. Google code offers for “free” ‣ SVN repository ‣ Managing contributors to a project ‣ Wiki
  • 19. Google code offers for “free” ‣ SVN repository ‣ Managing contributors to a project ‣ Wiki ‣ Ticketing system
  • 20. Google code offers for “free” ‣ SVN repository ‣ Managing contributors to a project ‣ Wiki ‣ Ticketing system ‣ Bug reporting
  • 21. Google code offers for “free” ‣ SVN repository ‣ Managing contributors to a project ‣ Wiki ‣ Ticketing system ‣ Bug reporting ‣ Visibility
  • 22. Google code hosting ⇒ your code is open source
  • 23. SVN: eclipse or command line
  • 24. Installing svn in Eclipse ‣ Help > dashboard > extension - Subversion (subclipse)
  • 25. Installing svn in Eclipse ‣ Help > dashboard > extension - Subversion (subclipse) ‣ Or command line: installed by default or - sudo apt-get install subversion
  • 26. Eclipse: connecting to the SVN repository ‣ menu Window - > open perspective - > SVN repository exploring
  • 27. Eclipse: connecting to the SVN repository ‣ menu Window - > open perspective - > SVN repository exploring ‣ view SVN repositories - > right click - > new repository location - https://geop-demo.googlecode.com/svn
  • 28.
  • 29.
  • 30.
  • 31. Sharing an existing project to your google code account
  • 32. Sharing an existing project to your google code account ‣ Perspective java
  • 33. Sharing an existing project to your google code account ‣ Perspective java ‣ project right-click - > team - > share project - use specifier folder name trunk/your.project.name
  • 34. ‣ username & password from google page ‣ save password check box
  • 35. Commit the project ‣ At this stage, the project is only created on the remote server - check with SVN repository exploring perspective - or browse source code from google page
  • 36. Commit the project ‣ At this stage, the project is only created on the remote server - check with SVN repository exploring perspective - or browse source code from google page ‣ Mark generated file & folder to be ignored from svn - e.g. target/
  • 37. Commit the project ‣ At this stage, the project is only created on the remote server - check with SVN repository exploring perspective - or browse source code from google page ‣ Mark generated file & folder to be ignored from svn - e.g. target/ ‣ Right-click > team > add to svn:ignore
  • 38.
  • 39.
  • 40. All eclipse functionalities can be replaced by shell commands
  • 41. SVN command line: share project ‣ Import original project demo.svn to the repository ‣ cd workspace directory svn import -m “initial import” --non-recursive demo.svn https://geop-demo.googlecode.com/svn/trunk/demo.svn ‣ Directory itself is not imported, so checkout (with force) svn checkout --force https://geop-demo.googlecode.com/svn/ trunk/demo.svn
  • 42. SVN command line: share project (cont’d) cd demo.svn ‣ Add target/ directory to svn:ignore svn propset svn:ignore target . ‣ Add other directories to svn svn add $(ls | grep -v target) ‣ Commit files svn commit -m "adding all initial files" ‣ Back to eclipse, F5 (refresh in package explorer view)
  • 44. From google code source page 25
  • 45. SVN for a daily use
  • 46. SVN for a daily use minutely
  • 47. SVN: flow use ‣ Checkout out or share an existing project to contribute
  • 48. SVN: flow use ‣ Checkout out or share an existing project to contribute ‣ Commit changes to the repository
  • 49. SVN: flow use ‣ Checkout out or share an existing project to contribute ‣ Commit changes to the repository ‣ Update changes from repository
  • 50. SVN: flow use ‣ Checkout out or share an existing project to contribute ‣ Commit changes to the repository ‣ Update changes from repository ‣ Eclipse: - select project - > right-click - > team - > Synchronize with repository - commit/update/manage conflict
  • 51. SVN: flow use (cont’d) ‣ Command line svn status svn update svn commit -m “my message to describe changes”
  • 53. SVN is more ‣ History
  • 54. SVN is more ‣ History ‣ See contribution from others
  • 55. SVN is more ‣ History ‣ See contribution from others ‣ Tag / branch versions
  • 56. SVN is more ‣ History ‣ See contribution from others ‣ Tag / branch versions ‣ Conflict resolution
  • 57. SVN is more ‣ History ‣ See contribution from others ‣ Tag / branch versions ‣ Conflict resolution ‣ Continuous integration / testing on dedicated server
  • 58. SVN is more ‣ History ‣ See contribution from others ‣ Tag / branch versions ‣ Conflict resolution ‣ Continuous integration / testing on dedicated server ‣ File locking :(
  • 59. SVN is more ‣ History ‣ See contribution from others ‣ Tag / branch versions ‣ Conflict resolution ‣ Continuous integration / testing on dedicated server ‣ File locking :( ‣ Integration with tickets
  • 60. SVN is more ‣ History ‣ See contribution from others ‣ Tag / branch versions ‣ Conflict resolution ‣ Continuous integration / testing on dedicated server ‣ File locking :( ‣ Integration with tickets ‣ Windows integration: http://tortoisesvn.tigris.org/
  • 61. Back to grails... and proteins isoforms
  • 62. Problem: uniprot AC ➙ isoform list in a web application
  • 63. Grails: including a third parties libraries ‣ Library is available as a jar (export ➙ .jar)
  • 64. Grails: including a third parties libraries ‣ Library is available as a jar (export ➙ .jar) ‣ Copy jar in lib/
  • 65. Grails: including a third parties libraries ‣ Library is available as a jar (export ➙ .jar) ‣ Copy jar in lib/ ‣ For eclipse completion - right-click - build path - add to build path
  • 66. Get is forms for ac (00:44:01.975) Q70Z44 List >Q70Z44-1 MQKHSPGPPALALLSQSLLTTGNGDTLIINCPGFGQHRVDPAAFQAVFDRKAIGPVTNYS VATHVNISFTLSAIWNCYSRIHTFNCHHARPWHNQFVQWNPDECGGIKKSGMATENLWLS DVFIEESVDQTPAGLMASMSIVKATSNTISQCGWSASANWTPSISPSMDRARAWRRMSRS FQIHHRTSFRTRREWVLLGIQKRTIKVTVATNQYEQAIFHVAIRRRCRPSPYVVNFLVPS GILIAIDALSFYLPLESGNCAPFKMTVLLGYSVFLLMMNDLLPATSTSSHASLVAPLALM QTPLPAGVYFALCLSLMVGSLLETIFITHLLHVATTQPLPLPRWLHSLLLHCTGQGRCCP TAPQKGNKGPGLTPTHLPGVKEPEVSAGQMPGPGEAELTGGSEWTRAQREHEAQKQHSVE LWVQFSHAMDALLFRLYLLFMASSIITVICLWNT >Q70Z44-2 MASMSIVKATSNTISQCGWSASANWTPSISPSMDRAERSPSALSPTQVAIRRRCRPSPYV VNFLVPSGILIAIDALSFYLPLESGNCAPFKMTVLLGYSVFLLMMNDLLPATSTSSHASL VRPHPSRDQKRGVYFALCLSLMVGSLLETIFITHLLHVATTQPLPLPRWLHSLLLHCTGQ GRCCPTAPQKGNKGPGLTPTHLPGVKEPEVSAGQMPGPGEAELTGGSEWTRAQREHEAQK QHSVELWVQFSHAMDALLFRLYLLFMASSIITVICLWNT
  • 67. Isoforms_v1 -> v5 same controller different views (gsp) for different rendering interaction
  • 68. Isoforms_v1 -> v5 same controller different views (gsp) for different rendering interaction
  • 69. Isoforms_vXController ⇒ views/isoforms_vX/ direcgtory with gsp’s
  • 70. IsoformController_v?.groovy def list = { def ac=params.ac def xml=new XmlSlurper() .parseText("http://pir.uniprot.org/uniprot/$ {ac}.xml".toURL().text).entry UniprotEntrySplicer splicer=[entryXml:xml] def proteins=splicer.buildAllIsoforms().values() as List [proteins: proteins] }
  • 71. v1
  • 72. isoforms_v1/list.gsp <html> <body> <h2>Get is forms for ac (${String.format('%tH:%<tM: %<tS.%<tL', new Date())})</h2> <g:form action="list"> <g:textField name="ac" value="${params.ac}" /> <g:submitButton name="submit" /> </g:form> <h3>List</h3> <g:each in="${proteins}" var="prot"> <pre> ${prot} </pre> </g:each> </body> </html>
  • 73. Problem: direct access to /list only
  • 74. v2
  • 75. v2
  • 76. isoforms_v2: add index.gsp <html> <body> <h1>Isoform list application</h1> <h2>Get is forms for ac (${String.format('%tH:%<tM: %<tS.%<tL', new Date())})</h2> <g:form action="list"> <g:textField name="ac" value="${params.ac}" /> <g:submitButton name="submit" /> </g:form> </body> </html>
  • 77. Problem: <g:form> is duplicated (DRY!)
  • 78. isoform_v3: use template ‣ _form.gsp <h2>Get is forms for ac (${String.format('%tH:%<tM:%<tS. %<tL', new Date())})</h2> <g:form action="list"> <g:textField name="ac" value="${params.ac}" /> <g:submitButton name="submit" /> </g:form>
  • 79. isoform_v3: use template ‣ _form.gsp <h2>Get is forms for ac (${String.format('%tH:%<tM:%<tS. %<tL', new Date())})</h2> <g:form action="list"> <g:textField name="ac" value="${params.ac}" /> <g:submitButton name="submit" /> </g:form> ‣ In index.gsp and list.gsp <g:render template="form" />
  • 80. isoform_v3: use template ‣ _form.gsp <h2>Get is forms for ac (${String.format('%tH:%<tM:%<tS. %<tL', new Date())})</h2> <g:form action="list"> <g:textField name="ac" value="${params.ac}" /> <g:submitButton name="submit" /> </g:form> ‣ In index.gsp and list.gsp <g:render template="form" />
  • 81. Problem: all the page is reloaded totally
  • 82. v4
  • 83. Ajax: asynchronous load web browser Q70Z44 submit server isoform/list 47
  • 84. Ajax: asynchronous load web browser Q70Z44 submit server isoform/list 47
  • 85. Ajax: asynchronous load web browser Q70Z44 submit server List isoform/list >Q70Z44-1 MQKHSPGPPALALLSQSLLTTGNGDTLIINCPGFGQHRVDPAAFQAVFDRKAIGPVTNYS VATHVNISFTLSAIWNCYSRIHTFNCHHARPWHNQFVQWNPDECGGIKKSGMATENLWLS DVFIEESVDQTPAGLMASMSIVKATSNTISQCGWSASANWTPSISPSMDRARAWRRMSRS FQIHHRTSFRTRREWVLLGIQKRTIKVTVATNQYEQAIFHVAIRRRCRPSPYVVNFLVPS GILIAIDALSFYLPLESGNCAPFKMTVLLGYSVFLLMMNDLLPATSTSSHASLVAPLALM QTPLPAGVYFALCLSLMVGSLLETIFITHLLHVATTQPLPLPRWLHSLLLHCTGQGRCCP TAPQKGNKGPGLTPTHLPGVKEPEVSAGQMPGPGEAELTGGSEWTRAQREHEAQKQHSVE LWVQFSHAMDALLFRLYLLFMASSIITVICLWNT >Q70Z44-2 MASMSIVKATSNTISQCGWSASANWTPSISPSMDRAERSPSALSPTQVAIRRRCRPSPYV VNFLVPSGILIAIDALSFYLPLESGNCAPFKMTVLLGYSVFLLMMNDLLPATSTSSHASL VRPHPSRDQKRGVYFALCLSLMVGSLLETIFITHLLHVATTQPLPLPRWLHSLLLHCTGQ GRCCPTAPQKGNKGPGLTPTHLPGVKEPEVSAGQMPGPGEAELTGGSEWTRAQREHEAQK QHSVELWVQFSHAMDALLFRLYLLFMASSIITVICLWNT 47
  • 86. isoform_v4/index.gsp <html> <head> <g:javascript library="prototype" /> </head> <body> <h2>Get is forms for ac (${String.format('%tH:%<tM: %<tS.%<tL', new Date())})</h2> <!-- g:formRemote stands for an ajax form --> <g:formRemote name="listForm" url="[action:'list']" update="isoforms-list"> <g:textField name="ac" value="${params.ac}" /> <g:submitButton name="submit" /> </g:formRemote> <!-- the target element of the form --> <div id="isoforms-list"/> </body> </html>
  • 89. People post messages and follow others
  • 90. database (domain) + controller (actions) + views (web)
  • 91. Domain: Person & Message
  • 92. Domain: bean definition + database storage
  • 93. Person domain ‣ Create the database entry + bean class grails create-domain-class Person project > right-click > grails > create-domain-class Person
  • 94. Person domain ‣ Create the database entry + bean class grails create-domain-class Person project > right-click > grails > create-domain-class Person ‣ Files created: ./grails-app/domain/eop/lec10/twitter/Person.groovy ./test/unit/eop/lec10/twitter/PersonTests.groovy
  • 95. Person.groovy ‣ Created class package eop.lec10.twitter class Person { static constraints = { } }
  • 97. Person.groovy ‣ Enriched with fields package eop.lec10.twitter class Person { String username String firstName String lastName String email Date dateCreated static constraints = { } }
  • 98. run-app ⇒ database + table created
  • 99. Web access: need controller + views
  • 103. PersonController.groovy create-controller Person ‣ grails-app/controller/PersonController.groovy: package eop.lec10.twitter class PersonController { def scaffold = true } ‣ scaffold generate all default action & view implicitely
  • 104. PersonController.groovy create-controller Person ‣ grails-app/controller/PersonController.groovy: package eop.lec10.twitter class PersonController { def scaffold = true } ‣ scaffold generate all default action & view implicitely
  • 111. http://localhost:8080/eop.lec10.twitter/person ‣ Back to list - view all - edit - delete - sort
  • 113. Person.groovy class Person { String username String firstName String lastName String email Date dateCreated //firstName is compulsory //email field has an email format //username cannot be null, is unique and is between 6 and 20 characters static constraints = { firstName(blank:false) email(email:true, blank:false) username(blank:false, unique:true, matches:/w{6,20}/) } }

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. for non-Cuban...\n
  17. for non-Cuban...\n
  18. for non-Cuban...\n
  19. for non-Cuban...\n
  20. for non-Cuban...\n
  21. for non-Cuban...\n
  22. \n
  23. we could use other SCM, but svn is more evolved than cvs, widely used, offered by google code, integrated in eclipse or on command line\n
  24. \n
  25. \n
  26. \n
  27. \n
  28. no trunk/\nacceptpermently\n
  29. no trunk/\nacceptpermently\n
  30. no trunk/\nacceptpermently\n
  31. no trunk/\nacceptpermently\n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. as soon as test work, for example\nseveral time a day\n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. eop 6-solutions -&gt; jar with build.xml\n
  61. eop 6-solutions -&gt; jar with build.xml\n
  62. eop 6-solutions -&gt; jar with build.xml\n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. _ in file name, but not in template tag attribute\n
  74. _ in file name, but not in template tag attribute\n
  75. _ in file name, but not in template tag attribute\n
  76. Although the form part does not change\nLimited here for the volume, but can be much more heavy\n
  77. \n
  78. Asynchronous javascript and xml\n
  79. Asynchronous javascript and xml\n
  80. Asynchronous javascript and xml\n
  81. Asynchronous javascript and xml\n
  82. Asynchronous javascript and xml\n
  83. \n
  84. \n
  85. \n
  86. test=test\ndevelopment=run-app\nproduction=packaged and deployed\n
  87. We can change, if you have access to the web during development\n
  88. \n
  89. \n
  90. \n
  91. \n
  92. def uniprotXmlService in controller will point directly to this bean\n
  93. to change from proteins problems...\n
  94. problem is simple yet illustrates plenty of aspects of a web application\ngrails: twitter in 40 minutes springsource webinar\n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. more fields with whatever classes are possible are possible\n
  102. but not very useful\nindeed, you can make SQL call\n(memory DB by default, but we&amp;#x2019;ll see how to put on file, postgres, mySql...)\n
  103. list, add, delete, update...\n
  104. \n
  105. we&amp;#x2019;ll see how to generate explicitly all of them later in order to be modified\n
  106. we&amp;#x2019;ll see how to generate explicitly all of them later in order to be modified\n
  107. we&amp;#x2019;ll see how to generate explicitly all of them later in order to be modified\n
  108. we&amp;#x2019;ll see how to generate explicitly all of them later in order to be modified\n
  109. \n
  110. \n
  111. \n
  112. \n
  113. unique username with given characters\nemail valid\nnon empty first name\n
  114. more fields with whatever classes are possible are possible\n
  115. Next time: foreign key (Person &lt;-&gt; Person &lt;-&gt; Message)\nCriteria\ndatabase persistence\n