text:
User:Planotse/Wvm/Wikiversity Mobile

Main Menu - Wikiversity Mobile

Wikiversity Mobile

a presentation by

User:Planotse

title: User:Planotse/Wvm/Wikiversity Mobile


text: User:Planotse/Wvm/Wikiversity Mobile/Introduction

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
User:Planotse/Wvm/Wikiversity Mobile/Topic List

Minimum Screen Resolution Program Objective Wikiversity Mobile Main Page Wikiversity Mobile School Entrance State of Wikiversity Mobile Mobile User Tasks Desktop User Tasks


text:
User:Commtheory

Education:

Bachelor of Science in Radio/TV Communication from Texas A&M University - Commerce

Master of Arts in Communication from The University of Texas at Tyler

Professional Associations:

National Communication Association

Southern States Communication Association

title: User:Commtheory


text: User:Planotse/Wvm/Wikiversity Mobile/Minimum Screen Resolution


text: User:Planotse/Wvm/Wikiversity Mobile/Program Objective


text:
User:Planotse/Wvm/Wikiversity Mobile/Wikiversity Mobile Main Page

Mobile is the main page for mobile users on Wikiversity. Mobile will be redirected there. A small link, I'm on Mobile, will be placed at the top-left corner of every page possible at Wikiversity to take mobile users to the main page for mobile users on Wikiversity.


text: User:Planotse/Wvm/Wikiversity Mobile/Wikiversity Mobile School Entrance


text: User:Planotse/Wvm/Wikiversity Mobile/State of Wikiversity Mobile


text: User:Planotse/Wvm/Wikiversity Mobile/Mobile User Tasks


text: User:Planotse/Wvm/Wikiversity Mobile/Desktop User Tasks


text:
Progress and Prospects in Parkinson's Research/Atypical Parkinsonism/Corticobasal Degeneration (CBD)

< Back to: Atypical parkinsonism

"Corticobasal Degeneration is a neurological disease, the symptoms of which can be difficult to distinguish from Parkinson's Disease"

Background
CBD is a progressive neurological disorder characterized by nerve cell loss and atrophy (shrinkage) of multiple areas of the brain including the cerebral cortex and the basal ganglia. It is a progressive, incurable and largely untreatable condition, the causes and pathology of which have yet to be determined

Onset is generally around the age of 60 and an average fatal outcome is 8 years. Typical symptoms include bradykinesia, freezing, impaired balance, rigidity, muscle jerks, visual and cognitive impairment, swallowing problems and speeh impediments. Many patients lose the ability to walk.

Research
2011

Mastrolilli et al reviewed the diagnostic criteria for CBD.

"Molecularly CBD is a taupathy, characterised by accumulation of abnormal ﬁlamentous inclusions of hyperphosphorylated tau-protein in neurons and glia, similarly to Progressive Supranuclear Palsy (PSP), and some forms of frontotemporal dementia with Parkinsonism. This molecular overlap, especially with PSP is very argued, and whether they are the extremities of the spectrum of a single disorder or two diﬀerent disorders with a similar genetic predisposition is not clear."

Related Pages
< Back to: Atypical parkinsonism


title: File:Bshift.mux.vhdl.20120719.pdf


text:
User:Missdinab

I am an architect and textile artist living in Troy, NY.

title: User:Missdinab


text: File:Poisson-solution.png

title: File:Poisson-solution.png


title: File:Burger-1d-time-delay.gif


title: File:L1DConDiff.png


text:
User:Planotse/IQA/SQL

Presentation
How to create a guided tour such as this presentation?

SQL Interview Q's & A's

a presentation by

User:Planotse

title: User:Planotse/IQA/SQL


text:
User:Planotse/IQA/SQL/Basic Concepts

Presentation
Constraint: an input filter Denormalizing: performance improvement through reduction in number of joins needed for data processing Indexes' tradeoffs: faster retrieval, slower updates Join: a logical connection between two tables Normalizing: eliminating redundant information and making it easier for future updates Primary key: a combination of columns which uniquely specify a row Where vs having: where is a restriction and having is a filter

title: User:Planotse/IQA/SQL/Basic Concepts


text:
Refresher/SQL

This is a refresher course for those who need to review basic knowledge of SQL.

For a comprehensive tutorial, go to http://www.1keydata.com/sql/sql.html.

Basic Concepts

 * Constraint: an input filter
 * Denormalizing: performance improvement through reduction in number of joins needed for data processing
 * Group by and order by clauses: expensive due to creation of temporary tables
 * Indexes' tradeoffs: faster retrieval, slower updates
 * Join: a logical connection between two tables
 * Normalizing: eliminating redundant information and making it easier for future updates
 * Primary key: a combination of columns which uniquely specify a row
 * Trigger: the code automatically executed in response to certain table events
 * Where vs having: where is a restriction and having is a filter
 * Wildcard: % using LIKE

Most Frequently Asked

 * Inner join: intersection, e.g. SELECT Person.LastName, Person.FirstName, Sales.OrderNo FROM Person INNER JOIN Sales ON Person.P_Id=Sales.P_Id ORDER BY Person.LastName
 * Outer join: union, e.g.
 * Foreign key: primary key of another table.

Comprehensive Tutorial
For a comprehensive tutorial, go to http://www.1keydata.com/sql/sql.html.

title: Refresher/SQL


text:
Refresher/SQL/Introduction

Presentation
How to create a guided tour such as this presentation?

Mobile version

title: Refresher/SQL/Introduction


text:
Refresher/SQL/Topic List

Presentation
Basic Concepts Most Frequently Asked Comprehensive Tutorial

Mobile version

title: Refresher/SQL/Topic List


text:
Refresher/SQL/Basic Concepts

Presentation
Constraint: an input filter Denormalizing: performance improvement through reduction in number of joins needed for data processing Group by and order by clauses: expensive due to creation of temporary tables Indexes' tradeoffs: faster retrieval, slower updates Join: a logical connection between two tables Normalizing: eliminating redundant information and making it easier for future updates Primary key: a combination of columns which uniquely specify a row Trigger: the code automatically executed in response to certain table events Where vs having: where is a restriction and having is a filter Wildcard: % using LIKE

Mobile version

title: Refresher/SQL/Basic Concepts


text:
Open Data/Wikibook on Open Data

The Institute of Metadata Management has asked The Centre for School Leadership, Learning and Development to develop an annotated list of 10 or 15 open data initiatives, explaining how they work and include examples of where their data has been reused. We are aiming to collect information on a wide enough range of projects so as to report on problems of definition around the term "open data". This Wikiversity page documents our progress in this project, and we blog our progress here

Stage 1: Set up
Set up a Wikibook and a Wikiversity space for this project. The Wikiversity space is used planning and developments, the Wikibook will become the published product of the project. Our objective at this stage is to try and recruit interest from volunteers in these Wikimedia Foundation project communities, as well as engage critical friends, including the people editing the Wikipedia page on Open data, and begin forming an initial list of significant projects that are investigating, developing, undertaking and/or promoting ‘open data’ initiatives. Our initial thoughts are to include examples of open data initiatives in government, research institutes and independently run projects.

We ambitiously need to finish this stage by the end of May 2012, please add your suggestions to be included on the draft list, to the discussion page thread on this wiki, for stage 1.

Stage 2: Survey
Collect information on open data projects using this survey. Make the survey open access for anyone to enter information on a project. Follow up and check the information provided. Use this information to inform the development of a final list to include in a report. Design the survey so that it collects information that may be useful for other open data information services.

Stage 3: Final list
Seek feedback from representatives of each of the listed initiatives, to check if the information is accurate and fair. Try and collect interviews to add to the information about each of the initiatives.

Start developing graphics and layout for the Wikibook This stage needs to be completed by mid September 2012

Stage 4: Report
Prepare a written report as a front cover to the Wikibook, and present the project to Meta2012. Include a video or audio recording of the presentation on the Wikibook.

Finish this stage by end of September.

title: Open Data/Wikibook on Open Data


text:
Talk:Open Data/Wikibook on Open Data

Survey
The survey is awaiting input. Please feel free to add information on any project you - the volunteer data entry person - feel to be an open data project.

5 possible major nodes
It was initially suggested we base our list from 5 major nodes:
 * 1) Open Access to Knowledge Law (OAK Law), a centre within Queensland University of Technology, to give us a more complete historical picture of open data initiatives in Australia and Internationally
 * 2) The Gov 2.0 Taskforce, commissioned by the Federal Department of Finance and Deregulation in 2009, to show us projects they see as significant to the more recent Gov 2.0 agenda
 * 3) The Australian National Data Service (ANDS), supported through the Australian National Collaborative Research Infrastructure Strategy Program and the Education Investment Fund (EIF) Super Science Initiative, to explain the type of open data projects they support and where they fit internationally
 * 4) Wikimedia Australia, a local chapter to the international Wikimedia Foundation, to show us local and international projects that are using Wikimedia projects as platforms for open data publishing
 * 5) Google Open Public Data Explorer, an initiative of Google Incorporated, to discuss the conditions for being included in that project, and to get a major commercial enterprise perspective on open data initiatives generally

Definitions, Terminology, Principles

 * UCL - http://discovery.ucl.ac.uk/open_access.html
 * Jon Mason's paper - http://www.intercog.net/publications/20071105_ICCE_Leeson_Mason.pdf
 * Open Definition, based on principles - http://opendefinition.org/
 * 8 Principles of Open Government Data - https://public.resource.org/8_principles.html
 * Campaign video http://www.youtube.com/watch?v=5FoYxzPZDuw&feature=youtu.be CC By
 * Open Standards for open Formats, Open Data - http://semanticweb.com/open-standards-for-data-formats-and-open-data_b77 Semantic Web focused
 * The Open Data Workflow - http://www.w3.org/2012/06/pmod/pmod2012_submission_21.pdf W3C Position Paper
 * 5 Star Data - http://5stardata.info/ Based on Tim Berners-Lee's modelling

Technology, information governance, management

 * Tim Berners-Lee: The Year Open Data went Worldwide - http://www.ted.com/talks/tim_berners_lee_the_year_open_data_went_worldwide.html
 * Open Standards in the UK - http://radar.oreilly.com/2012/05/uk-open-standards-software.html
 * Who represents all the data? - http://blogs.gartner.com/andrea_dimaio/2012/05/14/open-data-and-the-new-divide/

Government, Gov Agencies, Gov funded projects

 * Australian Government project to build new infrastructure specifically for the needs of Australian researchers - http://nectar.org.au NeCTAR
 * Department of Finance and Deregulation endorse Gov 2.0 Task Force recommendation to make all Public Service Information default to a copyright license of Creative Commons Attribution - http://agimo.govspace.gov.au/2010/10/07/government-2-0-update-%E2%80%93-amended-ip-principles-released/
 * NHMRC Mandates open access - http://theconversation.edu.au/all-research-funded-by-nhmrc-to-be-accessible-free-of-charge-5486
 * UK Mandates Open Access - http://blogs.nature.com/news/2012/05/key-questions-in-the-uks-shift-to-open-access-research.html
 * http://www.guardian.co.uk/technology/2012/may/01/wikipedia-research-jimmy-wales-online
 * http://openaccess.eprints.org/index.php?/categories/1-Self-Archiving-Mandates

 * USA Federal Research Public Access Act (FRPAA) to make all publicly funded research open access within 6 months - http://creativecommons.org/tag/frpaa
 * Research Data Australia is a discovery service for Australian research data. - http://services.ands.org.au/home/orca/rda/
 * GovHack, a meetup for, and Au$30000 prize money for, the best mashup of government data - http://www.govhack.org/
 * Data.Gov - http://www.data.gov/
 * Data.Gov (Aust) - http://data.gov.au/
 * Data.NSW - http://data.nsw.gov.au/
 * Data.VIC - http://www.data.vic.gov.au/
 * AusGOAL - Federating Government Data Portals - http://www.ausgoal.gov.au/data.x.gov.au
 * Australian Cultural data - http://www.culturaldata.gov.au/
 * Canada's Action Plan on Open Government - http://www.open.gc.ca/index-eng.asp Based on "Three Pillars" of Open Data, Open Dialogue, and Open Information
 * Open Government Partnership - http://www.opengovpartnership.org/open-government-declaration
 * British Library Metadata Services - Free Data Services - http://www.bl.uk/bibliographic/datafree.html/
 * UK Govt Open data Consultation - http://data.gov.uk/opendataconsultation

Universities, Research Institutes, Research Projects

 * Amgen’s incomplete report on an early major trial of epoetin misled the medical community about the anemia drug’s risks and benefits—and helped make Amgen rich - http://the-scientist.com/2012/05/14/opinion-misleading-drug-trials/
 * Lack of data leading to poor policy in the handling of epidemics - http://the-scientist.com/2012/05/01/data-diving/
 * Association of College & Research Libraries (US) - Scholarly Communication Toolkit: Open Data, Open Science, Open Educational Resources - http://www.scholcomm.acrl.ala.org/node/50
 * The denton Declaration - An Open Data Manifesto - http://openaccess.unt.edu/denton_declaration

Associations, NGOs, other organisations
Wikipedia
 * List of organisations promoting open data - http://en.wikipedia.org/wiki/Open_data#Organisations_promoting_open_data
 * Project to pick up ABS data and present it in Wikipedia pages http://lists.wikimedia.org/pipermail/wikimediaau-l/2012-May/003295.html
 * Wikidata - http://meta.wikimedia.org/wiki/Wikidata

Wikibooks
 * http://en.wikibooks.org/wiki/Open_Metadata_Handbook

Others
 * Linking open data - http://www.researchpipeline.com/mediawiki/index.php?title=Linking_Open_Data
 * Linking open data - http://linkeddata.org/
 * Open Data Commons - http://opendatacommons.org/
 * Data Journalism - http://datajournalismhandbook.org/
 * Coalition for Networked Information - http://www.cni.org/
 * Open Grid Forum (formerley Global Grid Forum) - http://www.ogf.org/
 * Open Source Big Data - http://www.gridgain.com/
 * Open Data Institute - http://theodi.org/drupal7/ Tim Berners-Lee behind this
 * Open Data Alliance - http://www.opendatacenteralliance.org/ Founded 2010; led by Intel; corporate consortium
 * Open Data Group - http://opendatagroup.com/ Consultancy focused on predictive models, big data, & analytics
 * OASIS (Advancing Open Standards for the Information Society) - https://www.oasis-open.org/
 * Open Data Format Initiative - http://odfi.org/
 * Global Learning Resource Connection - http://www.jesandco.org/weblink-cat-ourprojects/web-cat-glrc
 * DataKind Data Dive - http://datakind.org/york-city-datadive/

Models, Specifications & Protocols, Licenses

 * OData - http://www.odata.org/ An initiative of OASIS
 * Open Archives Initiative - http://www.openarchives.org/OAI/openarchivesprotocol.html This has been a very important protocol in the historical development of the Web in relation to sharing of digital collections.
 * OpenMAMA Project - http://www.openmama.org/ Middleware Agnostic Messaging API (MAMA)
 * Open Conceptual Data Models http://virtuoso.openlinksw.com/whitepapers/open%20conceptual%20data%20models.html
 * Open Data Model - http://www.opendatamodel.com/ Focused on database design
 * Open Data Format - http://ewh.ieee.org/cmte/psace/CAMS_taskforce/format.htm sponsored by IEEE
 * City of Vancouver Open Data Formats - http://data.vancouver.ca/dataFormats.htm
 * GOM Inspection Exchange Format - http://www.gom.com/3d-software/open-data-formats.html 3D datasets
 * Common Data Format - http://cdf.gsfc.nasa.gov/ Led by NASA
 * Microformats - http://microformats.org/
 * British Library Data Model - http://talis-systems.com/2011/07/british-library-data-model-overview/
 * Open Data Commons Licenses - http://opendatacommons.org/licenses/
 * XTF eXtensible Text Format - http://xtf.cdlib.org/

Directories and portals to open data internationally
A good overview of current public data sets is given on: http://maps.google.at/maps/ms?ie=UTF8&source=embed&oe=UTF8&msa=0&msid=105833408128032902805.00048bfbba4ecb314e822&ll=31.952162,7.734375&spn=117.143188,352.265625&z=1

This is part of the Austrian Linked Data portal at: http://gov.opendata.at/site/node/38 The main European meta site for public data can be found at: http://www.publicdata.eu/ This is an outcome of the LOD2 project: http://lod2.eu/Welcome.html Probably the most comprehensive public data initiative next to the one of the UK and the US is the French public data portal: http://www.data.gouv.fr/ A repository for Linked Open Data can be found at: http://thedatahub.org/ A validator for the most recent additions to the DataHub can be found at: http://www4.wiwiss.fu-berlin.de/lodcloud/ckan/validator/ The newest Linked Data Cloud will probably be published in the next two weeks at: http://richard.cyganiak.de/2007/10/lod/

12 Sep 2012
IMM and CSLLD Teleconference

Kathryn Moyle tabled an initial and very rough draft of the report, mostly to check that the style and direction of it was consistent with IMM's expectations. It was agreed that it was, and the Kathryn would continue developing the report, including notation to data captured in the survey, and drawing from information recorded on this wiki.

Some discussion was had reflecting on the poor response rate to the survey (10 entries only) despite email and telephone efforts to encourage responses, and then offerings to enter information on behalf of projects if they were simply nominated with a name of URL. The poor response is considered information in itself, and could be used to inform some level of critical discourse on open data as a movement.

The final draft of the report will be prepared by end of September, including the information captured in the survey and documented in the wiki discussion page. The report will be copied into the Wikibook, and IMM will consider using the report to inform their own publications.

3 May 2012
IMM and CSLLD Teleconference:

Motivation for commissioning the work:

doing something different not just benchmarking best practice or getting "how to" from other players

Who do we anticipate being the audience:
 * people working with data
 * Those implicated for organisational change - policy makers, organisational development etc

Definition of Open Data: Partly to come from the project, partly informed by existing definitions. References to come. We will problematise the definition of open data - how it is perceived within the environment

Which organisations to focus on to start? (based on what our group knows now):

Victorian government - Nadia Mecoi - Nadia Mecoli SA government - Bryan King NZ government - Keitha Booth

Next meetings: Morning of 28th May 2012

Issues arising during investigation
The following comments are observations & anecdotal comments based upon communications with stakeholders:

 * 1) Academics, while overwhelming in their support for the benefits of open access and free software, generally do not want to share their data because of "intellectual property".
 * 2) Services such as ANDS (Australian National Data Service) have currently put in place infrastructure that may serve as a useful foundation for open data & greater public access to publicly-funded research. However, most entries in the ANDS registry to date require significant further investigation to track down how to access the resources listed or described
 * 3) Discussion in this wiki is not easily triggered in this "Discuss" section
 * 4) There appears to be an assumption by some prominent communities that the "open data" agenda is being led by the Open Government movement Open Data Emerges as a Global Movement. Such an assumption appears to be questionable given the other facets to openness associated with the Internet (architecture, source code, standards, educational resources, access, etc).
 * 5) In September, Wikileaks was entered into the our survey collecting information about open data projects. Receiving this response posses a number of interesting questions around the similarities and differences between the motivations, methods and principles of a project like Wikileaks, and the seemingly wide growth of open government data projects world wide, and the open government or "gov2.0" movement.
 * 6) There has been a very poor response rate to the open survey (9 responses), despite the survey going out to major forums, twitter channels, to Offices of Information Ministers known to be engaging in open data initiatives, and direct telephone calls with offers to enter information to the survey on behalf of projects, if those called could just nominate a project. This poor response rate raises a number if old and new issues, such as whether open surveys are an effective instrument and method; whether the design and implementation of this particular survey was suitable (we did have it reviewed by several critical friends however), if simply we did not reach far enough into the open data networks (suggested by the majority of the entries being local to us)... or perhaps the poor response signals some other areas in need of consideration. If there has been a poor response from people inside the open data movement, and if part of their premise of that movement is that open data (especially government data) will improve democratic engagement, or enable crowd based resourcing, then a poor response rate to an open survey targeting people engaged in open data suggests that such a premise may be questionable, at least in this point in time...

title: Talk:Open Data/Wikibook on Open Data


text:
User:Xenomancer

About Me
http://en.wikipedia.org/wiki/User:Xenomancer

title: User:Xenomancer


text:
Refresher/XML

This is a refresher course for those who need to review basic knowledge of XML.

Basic Concepts

 * Character data example: <![CDATA[ John Smith ]]>
 * Document Object Model (DOM) a cross-platform, language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents
 * Document Type Definition (DTD): markup declarations defining a document type for an SGML-family markup language (SGML, XML, HTML). XML uses a subset of SGML DTD
 * Extensible Markup Language (XML): markup language defines rules for encoding documents in a format both human-readable and machine-readable
 * Extensible Stylesheet Language (XSL): a family of languages used to transform and render XML documents
 * Semantics: the study of meaning and the relation between signifiers
 * XML data binding: a means of representing information in an XML document as a business object in computer memory
 * XML document structure: must have root tag, be case sensitive and close all tags
 * XML for Analysis (XMLA): an industry standard for data access in analytical systems, such as OLAP and data mining
 * XML namespaces: used for providing uniquely named elements and attributes in an XML document, WPF Example 1: Because of xmlns:="..." and xmlns:x="...",  has 2 name resolutions StackPanel and x:Name
 * XML Path Language (XPath): a non-XML language, used by XSLT, for addressing the parts of an XML document
 * XQuery: programming language designed to query XML data collections
 * XSL Formatting Objects (XSL-FO): an XML language for specifying the visual formatting of an XML document
 * XSL Transformation (XSLT): an XML language for transforming XML documents

Serialization

 * Binary serialization: serializing an object in binay format -- entire object state is saved and instance identity is preserved
 * Deserialization: reverse of serialization
 * marshalling (similar to serialization): the process of transforming the memory representation of an object to a data format suitable for storage or transmission
 * serialization: converting a data structure into a format that can be stored and "resurrected" later
 * Unmarshalling: reverse of marshalling and similar to deserialization
 * XML serialization: serializing an object into an XML file

XML Schema

 * Processing instruction -- Syntax <?PITarget PIContent?> -- Example
 * XML Schema: description of a type of XML document and is one of several XML schema languages
 * Schema is an abstract collection of metadata, consisting of a set of schema components
 * Schema components: element and attribute declarations and complex and simple type definitions
 * Schema documents: the source language definitions of schema components

title: Refresher/XML


text:
Refresher/XML/Introduction

Presentation
How to create a guided tour such as this presentation?

Mobile version

title: Refresher/XML/Introduction


text:
Refresher/XML/Basic Concepts

Presentation
Character data example: <![CDATA[ John Smith ]]> Document Object Model (DOM) a cross-platform, language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents '''Document Type Definition (DTD): markup declarations defining a document type for an SGML-family markup language (SGML, XML, HTML). XML uses a subset of SGML DTD''' Extensible Markup Language (XML): markup language defines rules for encoding documents in a format both human-readable and machine-readable Extensible Stylesheet Language (XSL): a family of languages used to transform and render XML documents Semantics: the study of meaning and the relation between signifiers XML data binding: a means of representing information in an XML document as a business object in computer memory XML document structure: must have root tag, be case sensitive and close all tags XML for Analysis (XMLA): an industry standard for data access in analytical systems, such as OLAP and data mining '''XML namespaces: used for providing uniquely named elements and attributes in an XML document, WPF Example 1: Because of xmlns:="..." and xmlns:x="...",  has 2 name resolutions StackPanel and x:Name''' XML Path Language (XPath): a non-XML language, used by XSLT, for addressing the parts of an XML document XQuery: programming language designed to query XML data collections XSL Formatting Objects (XSL-FO): an XML language for specifying the visual formatting of an XML document XSL Transformation (XSLT): an XML language for transforming XML documents

Mobile version

title: Refresher/XML/Basic Concepts


text:
Refresher/XML/Topic List

Presentation
Basic Concepts Serialization XML Schema

Mobile version

title: Refresher/XML/Topic List


text:
Refresher/XML/Serialization

Presentation
Binary serialization: serializing an object in binay format -- entire object state is saved and instance identity is preserved Deserialization: reverse of serialization marshalling (similar to serialization): the process of transforming the memory representation of an object to a data format suitable for storage or transmission serialization: converting a data structure into a format that can be stored and "resurrected" later Unmarshalling: reverse of marshalling and similar to deserialization XML serialization: serializing an object into an XML file

Mobile version

title: Refresher/XML/Serialization


text:
Refresher/dotnet/Introduction

Presentation
How to create a guided tour such as this presentation?

Mobile version

title: Refresher/dotnet/Introduction


text:
Refresher/dotnet/Topic List

Presentation
Basic Concepts Basic Classes Windows Services

Mobile version

title: Refresher/dotnet/Topic List


text:
Refresher/dotnet/Windows Services

Presentation
How to create a guided tour such as this presentation?

Windows services: background applications Windows service creation: add new windows service project, set properties, write the logic for OnStart and OnStop, override default methods as needed, add installer, build project, install and test or run

Mobile version

title: Refresher/dotnet/Windows Services


text:
Refresher/csharp

This is a refresher course for those who need to review basic knowledge of C# (csharp).

Basic Concepts

 * Comment styles: Single-line (//), multi-line (/* */) and XML documentation comments (///)
 * delegate (function pointers in C++): an object encapsulates reference to a method
 * HashTable: datatype allowing data retrieval by unique key
 * Interface: an approach to multiple inheritance, contains only abstract members (events, methods, properties) and no constants, data fields, constructors, and destructors
 * multicast delegate: a delegate that points to and eventually fires off several methods
 * Three-tier: presentation (UI), business (logic and underlying code) and data (from storage or other sources) layers

Basic Classes

 * Debug vsTrace class: debug builds only or both debug and release builds
 * Localization namespaces: System.Globalization and System.Resources
 * System.Array.CopyTo vs System.Array.Clone: deep vs shallow copy of an array
 * System.Text.StringBuilder over System.String: more efficient when a lot of manipulation is done to the text

Basic Limitation

 * System.Array: cannot store multiple data type

Basic Operations

 * ACID rule of thumb for transactions: Transaction must be Atomic (independent off other transactions), Consistent (committed or roll back), Isolated (other transactions cannot see intermediate results), Durable (values persist if committed)
 * ASP.NET Web application debugging: attach the aspnet_wp.exe process to the DbgClr debugger
 * Assembly deployment: MSI installer, CAB archive, and XCOPY command
 * Descending sorting: by calling Sort and then Reverse methods
 * Immediate window in VS.IDE: change value of a variable while debugging a C# application
 * Test cases in unit testing: Positive, negative and exception
 * try { control transfer only after finally block executed } catch (Exception ex) { } finally { executed if no exceptions but exceptions herein are not handled }

Authentication

 * SQL Server authentication: untrusted as username and password are not checked with the Active Directory
 * Windows Authentication: trusted as username and password are checked with the Active Directory

Database

 * Initial Catalog: name of wanted database in a Connection String

Accessibility Modifiers

 * Class inheritance: colon + base class
 * Private class-level variables: inherited but not accessible
 * Value: keyword for implicit input name of the set method in object classes
 * Protected class-level variables: available to classes in the same namespace
 * Protected internal: available to derived classes, and classes within the same Assembly, and the base class
 * Default constructor: disappears when any constructor is written
 * System.Object: top .NET class that everything is derived from
 * Method overriding: changing the method behavior for a derived class
 * Virtual method: can be over-ridden but cannot change method signature
 * Sealed class (in Java, final class): cannot be inherited
 * Sealed method: method cannot be inherited but class can when not sealed
 * Abstract class methods: not all must be abstract, some can be concrete
 * Abstract class required when at least one of the methods in the class is abstract
 * Abstract method: require non-abstract derived classes to provide their own implementation of this method
 * Interface class? an abstract class with public abstract methods all of which must be implemented in the inherited classes
 * Interface class methods: all must be abstract and public and thus accessibility modifiers not needed
 * Multiple interfaces: can be inherited
 * Namespace class: classes are declared inside a namespace

Delegates How and When

 * Delegate: a class -- usable if declared and instantiated
 * Delegate use: passed around as a parameter, and invoked by the receiving object
 * Delegate example 1: success = MyAddressProvider.HandleCampaign(WhatToDoWithAddresses)
 * Delegate example 2: MyMenuItem.Click += new System.Windows.RoutedEventHandlerMyMenuItem_Click)

Singleton

 * Singleton design pattern: interface allowing a class to enforce single instantiation
 * C# singleton example: http://www.dotnetperls.com/singleton

title: Refresher/csharp


text:
Refresher/csharp/Introduction

Presentation
How to create a guided tour such as this presentation?

Mobile version

title: Refresher/csharp/Introduction


text:
Refresher/csharp/Topic List

Presentation
Basic Concepts Basic Classes Basic Limitation Basic Operations Authentication Database Accessibility Modifiers

Mobile version

title: Refresher/csharp/Topic List


text:
Refresher/csharp/Basic Concepts

Presentation
Comment styles: Single-line (//), multi-line (/* */) and XML documentation comments (///) delegate (function pointers in C++): an object encapsulates reference to a method HashTable: datatype allowing data retrieval by unique key Interface: an approach to multiple inheritance, contains only abstract members (events, methods, properties) and no constants, data fields, constructors, and destructors multicast delegate: a delegate that points to and eventually fires off several methods Three-tier: presentation (UI), business (logic and underlying code) and data (from storage or other sources) layers

Mobile version

title: Refresher/csharp/Basic Concepts


text:
Refresher/csharp/Basic Classes

Presentation
Debug vsTrace class: debug builds only or both debug and release builds Localization namespaces: System.Globalization and System.Resources System.Array.CopyTo vs System.Array.Clone: deep vs shallow copy of an array System.Text.StringBuilder over System.String: more efficient when a lot of manipulation is done to the text

Mobile version

title: Refresher/csharp/Basic Classes


text:
Refresher/csharp/Basic Limitation

Presentation
System.Array: cannot store multiple data type

Mobile version

title: Refresher/csharp/Basic Limitation


text:
Refresher/csharp/Basic Operations

Presentation
ACID rule of thumb for transactions: Transaction must be Atomic (independent off other transactions), Consistent (committed or roll back), Isolated (other transactions cannot see intermediate results), Durable (values persist if committed) ASP.NET Web application debugging: attach the aspnet_wp.exe process to the DbgClr debugger Assembly deployment: MSI installer, CAB archive, and XCOPY command Descending sorting: by calling Sort and then Reverse methods Immediate window in VS.IDE: change value of a variable while debugging a C# application Test cases in unit testing: Positive, negative and exception try { control transfer only after finally block executed } catch (Exception ex) { } finally { executed if no exceptions but exceptions herein are not handled }

Mobile version

title: Refresher/csharp/Basic Operations


text:
Refresher/csharp/Authentication

Presentation
SQL Server authentication: untrusted as username and password are not checked with the Active Directory Windows Authentication: trusted as username and password are checked with the Active Directory

Mobile version

title: Refresher/csharp/Authentication


text:
Refresher/csharp/Database

Presentation
Initial Catalog: name of wanted database in a Connection String

Mobile version

title: Refresher/csharp/Database


text:
Refresher/dotnet/Basic Concepts

Presentation
Mobile version

title: Refresher/dotnet/Basic Concepts


text:
Refresher/dotnet/Basic Classes

Presentation
Mobile version

title: Refresher/dotnet/Basic Classes


text: Windows service

title: Windows service


text: .NET

title: .NET


text:
Refresher/SQL/Topic 3

Presentation
How to create a guided tour such as this presentation?

Inner join: intersection, e.g. SELECT Person.LastName, Person.FirstName, Sales.OrderNo FROM Person INNER JOIN Sales ON Person.P_Id=Sales.P_Id ORDER BY Person.LastName Outer join: union, e.g.

Mobile version

title: Refresher/SQL/Topic 3


text:
Refresher/SQL/Most Frequently Asked

Presentation
Inner join: intersection, e.g. SELECT Person.LastName, Person.FirstName, Sales.OrderNo FROM Person INNER JOIN Sales ON Person.P_Id=Sales.P_Id ORDER BY Person.LastName Outer join: union, e.g. Foreign key: primary key of another table.

Mobile version

title: Refresher/SQL/Most Frequently Asked


title: File:Bshift.mux.vhdl.20120720.pdf


text: File:Burgers-solution.png

title: File:Burgers-solution.png


text:
Refresher/csharp/Accessibility Modifiers

Presentation
How to create a guided tour such as this presentation?

Class inheritance: colon + base class Private class-level variables: inherited but not accessible Value: keyword for implicit input name of the set method in object classes Protected class-level variables: available to classes in the same namespace Protected internal: available to derived classes, and classes within the same Assembly, and the base class Default constructor: disappears when any constructor is written System.Object: top .NET class that everything is derived from Method overriding: changing the method behavior for a derived class Method overloading: using the same method name again in the same class but with different number, type and order of

parameters Virtual method: can be over-ridden but cannot change method signature Method signature: its name and the number and type of its parameters, where the last parameter may comprise of an array

of values Sealed class (in Java, final class): cannot be inherited Sealed method: method cannot be inherited but class can when not sealed Abstract class (in C++, pure virtual method): blueprint for a class without any implementation and thus cannot be

instantiated Abstract class methods: not all must be abstract, some can be concrete Abstract class required when at least one of the methods in the class is abstract Abstract method: require non-abstract derived classes to provide their own implementation of this method '''Interface class? an abstract class with public abstract methods all of which must be implemented in the inherited classes''' Interface class methods: all must be abstract and public and thus accessibility modifiers not needed Multiple interfaces: can be inherited Namespace class: classes are declared inside a namespace

Mobile version


text:
Progress and Prospects in Parkinson's Research/Causes/Infection/Helicobacter pylorii

'''For decades medical science attributed the onset of stomach ulcers to a diet containing spicy food, or too much stomach acid or to stress. In this last instance the vagus nerve was postulated as a likely channel for infection between the CNS and the digestive system.'''

'''In 1979 a Medical Registrar named Barry Marshall teamed up with Robin Warren a pathologist at the Royal Perth Hospital, Australia and developed and published the hypothesis that bacterial infection and in particular colonies of helicobacter pylori, (HP)embedded in the lining of the duodenum, were responsible for the appearance of stomach ulcers,  This was greeted with scepticism by the medical establishment on the grounds that such bacteria could not survive in a solution of stomach acid. This argument was strengthened when Marshall and Warren failed to reproduce the condition in pigs in 1984.'''

'''At this point Marshall decided to prove the theory by drinking the contents of a Petri dish infected with Helicobacter pylori. He thought it might take a year for an ulcer to develop, but went on to develop acute gastric inflammation within days.. One of the early symptoms was halitosis from the waste products given off by bacteria. Also he failed to produce antibodies hinting that some people may have a natural genetic immunity to HP. He was awarded the Nobel prize for physiology in 2005.'''

Now, in a complete reversal of the theory that nervous stress is responsible for gastric malfunction, some researchers are postulating that this bacterium may be the trigger for PD.

Background
Helicobacter_pylori is a bacterium, which takes up residence in the human digestive system. Some estimates put the proportion of people infected at 50%. Some 80% of infected people experience no symptoms and there is some speculation that it might have a beneficial effect. But for others it has been associated with the onset of chronic gastritis, duodenal ulcers and stomach cancer. It is treatable with regular antibiotics.

Research
1965

Strang evaluated the relationship between stomach ulcers and the onset of PD.

A cohort was formed of 250 randomly selected PD patients over 35 and a control group of a near relative without PD. 23 PD patients had confirmed duodenal ulceration compared with 9 in the control group. The average time interval between the onset of ulcer and PD symptoms was 18 years for males and 10 years for females.

1979

Szabo et al demonstrated that dosing rats with the PD-inducing drug MPTP also resulted in ther development of duodenal ulcers.

The ulcers were prevented by pretreatment with dopamine agonists (e.g., bromocriptine, lergotrile) or monoamine oxidase inhibitors (e.g., pargyline, 1-deprenyl).

High doses of MPTP also caused gastric erosions and motility changes resembling parkinsonism (e.g., akinesia, rigidity, forward bending of trunk). This chemical decreased gastric secretion of acid and pepsin, as well as pancreatic bicarbonate, trypsin and amylase.

"Thus, MPTP causes duodenal ulcers that are possibly associated with impaired defence in the duodenal bulb."

1996

Altschuler, E. (1996)was the first person to publish the hypothesis that Helicobacter might be a causaive agent for PD.

2005

Dobbs et al examined PD patients with low Body Mass Index and Helicobacter infection. When these last two factors were corrected in one patient, a reversal of PD symptoms was observed.

Bjarnason et al measured the effect of Helicobacter eradication on a cohort of PD patients. Their conclusions were:-

"Interim analysis points to a direct or surrogate (not necessarily unique) role of a particular infection in the pathogenesis of parkinsonism. With eradication failure, bolus release of antigen from killed bacteria could aggravate an effect of ongoing infection."

Weller et al assessed whether the presence of Heilcobacter antibodies in blood serum could serve as a biomarker for PD. Their conclusions:-

"The apparent importance of H. pylori in the etiology/pathogenesis of idiopathic parkinsonism is not confined to those with evidence of current infection."

2008

Dobbs et al pt forward the hypothesis that Helicobacter infection might be a causative agent for PD.

2012

Tan, and Goh reviewed the evidence for helicobacter infection being responsible for diseases outside of the digestive system.

Nielsen et al tested the hypothesis that infection with Helicobacter pylori (HP) contributes to the development of Parkinson's disease (PD.

Data was collected for 4484 patients with a first time PD diagnosis between 2001 and 2008 from the Danish National Patient Register (DNPR) and 22, 416 population controls from the Danish Civil Registration System (CRS) together with information on drug use  from the National Prescription Registry (NPR).

"Population-based study suggests that chronic HP infections and/or gastritis contribute to PD or that these are PD-related pathologies that precede motor symptoms."


text:
Refresher/XML/XML Schema

Presentation
How to create a guided tour such as this presentation?

Processing instruction -- Syntax <?PITarget PIContent?> -- Example  XML Schema: description of a type of XML document and is one of several XML schema languages Schema is an abstract collection of metadata, consisting of a set of schema components Schema components: element and attribute declarations and complex and simple type definitions Schema documents: the source language definitions of schema components

Mobile version

title: Refresher/XML/XML Schema


text:
HTML/Meta Tags

Meta tags are HTML tags that helps you get better rankings with a search engine. They also describe the web page for future web developers. There are five different meta tags, but two most commonly used by search engines are described.

This tag looks like , where words is the search term(s) you would like to have for your web page (eg you have a web page that talks about how to care for dogs, you then put the command  for your meta tag). Pretty simple, huh?

The other meta tag I will discuss is similar. It looks like this: , where your content is a extended description of your web page.

Both of these meta tags are just the beginning: there are three other meta tags. However, if you plan to put meta tags in your web page, these two are necessities.

title: HTML/Meta Tags


text:
User:Nikhilwandhe

Nikhil S Wandhe Student at Yeshwantrao Chavan college of Engineering Nagpur Interests:Reading and Cooking

title: User:Nikhilwandhe


text: File:Trimurti Yoga.JPG

title: File:Trimurti Yoga.JPG


title: File:Misc.2.A.MinPhase.20120721.pdf


text:
Talk:Nonlinear finite elements/Euler Bernoulli beams

Hi

could anyone post some reference for the equations in the page?

Parse
Failed to parse


text:
Template:Wkhroom

 Room :

title: Template:Wkhroom


text: Java Tutorial/Trail: Eclipse XML Window Toolkit (XWT)


text: Category:Resources needing updating

title: Category:Resources needing updating


text:
Refresher/SQL/Comprehensive Tutorial

Presentation
How to create a guided tour such as this presentation?

Mobile version

title: Refresher/SQL/Comprehensive Tutorial


text:
Refresher/TDD/Introduction

Presentation
How to create a guided tour such as this presentation?

Mobile version

title: Refresher/TDD/Introduction


text:
Refresher/TDD

This is a refresher course for those who need to review basic knowledge of test-driven development (TDD).

Basic Concepts

 * TDD: tiny cycle repetition of red, green and refector -- failing test script, code to pass, refactor to standards
 * XP key principles: rapid feedback, incremental change and assuming simplicity

Code Review

 * Code review: systematic examination of source code through peer review
 * Review forms: pair programming, informal walkthroughs or formal inspections

Beyond

 * safe and fast: basic security, time complexity, then micro improvement

Polymorphism

 * Late binding: method looked up by name at run-time and exact behavior determined at run-time
 * Early binding: method name and signature stored in the virtual method table (v-table) at compile time
 * Polymorphism: objects from different types responding to calls by the same name, e.g. operator overloading for addition

title: Refresher/TDD


text:
Refresher/TDD/Topic List

Presentation
Basic Concepts FAQ References Unit Testing Code Review Beyond Polymorphism

Mobile version

title: Refresher/TDD/Topic List


text:
Refresher/TDD/Basic Concepts

Presentation
TDD: tiny cycle repetition of red, green and refector -- failing test script, code to pass, refactor to standards XP key principles: rapid feedback, incremental change and assuming simplicity

Mobile version

title: Refresher/TDD/Basic Concepts


text:
Refresher/TDD/References

Presentation
How to create a guided tour such as this presentation?

http://www.extremeprogramming.org/rules.html/

Mobile version

title: Refresher/TDD/References


text:
Refresher/TDD/Code Review

Presentation
Code review: systematic examination of source code through peer review Review forms: pair programming, informal walkthroughs or formal inspections

Mobile version

title: Refresher/TDD/Code Review


text:
Refresher/TDD/Beyond

Presentation
How to create a guided tour such as this presentation?

safe and fast: basic security, time complexity, then micro improvement

Mobile version

title: Refresher/TDD/Beyond


text:
Refresher/TDD/Polymorphism

Presentation
How to create a guided tour such as this presentation?

Late binding: method looked up by name at run-time and exact behavior determined at run-time Early binding: method name and signature stored in the virtual method table (v-table) at compile time Polymorphism: objects from different types responding to calls by the same name, e.g. operator overloading for addition

Mobile version

title: Refresher/TDD/Polymorphism


text:
Web Development with Webmachine for Erlang

Origin and Aims
Webmachine is a REST framework built on top of Mochiweb, a web server written in Erlang. It aims at easily building a web service with correct HTTP semantics while not having to deal with HTTP in the business logic. Webmachine was refactored out of Riak as explained in the talk "Webmachine: a Practical Executable Model of HTTP" by one of its creators, Justin Sheehy. Since it was the initial implementation, this article mostly discusses the Erlang one and is focused on writing a REST service with Webmachine for Erlang.

Principles
The framework implements some default behaviour and the application has to implement a given set of functions which will be called by Webmachine (Hollywood Principle). All functions have the same signature which is:

 * Result: contains mostly true/false which act as signals for the decision core in the framework code.

 * ReqData: stores the request and response. Every function can read and modify those and pass them on to the next function.

 * Context: is ignored by the framework. In this parameter the application can store internal state for processing of one request.

Webmachine enforces a side effect free programming model because of the underlying implementation in Erlang. The only possibility to modify state inside another function is to pass an argument to it. With this in mind, a Webmachine application can be seen as a set of functions which call each other with their computed values.

Structure of a Webmachine Application
An application consists of one ore more resources. These are Erlang modules which usually implement framework callbacks and internal functions. The resources are located in the /src folder. For every application there is also a dispatch.conf file which configures the routes of an URL accessing request to a resource.

Building a REST Service
The running example will be a paper repository. It provides an API to store, change, retrieve and delete papers with their title and author.

The operations which are implemented in the example are the following:

The example will be developed in a test driven manner. The API tests are written with the excellent Python library Requests by Kenneth Reitz. Erlang unit tests are written with EUnit.

All source code can be found in a Github repository.

What we expect from the fresh Application
A barebones Webmachine application listens to port 8888 and returns a short html response stating "Hello world".

Running the test with python -m unittest api_tests.py -v

should produce a failing assertion. If this test succeeds, it means that there is already an application running on that port.

Install and run a basic Webmachine Application
For this tutorial a working installation of Erlang is needed. There are precompiled binaries available and it is also accesible via package managers.

After this, clone the Webmachine code repository from github.

git clone git://github.com/basho/webmachine.git

Then let it generate the skeleton code for our application which we will call prp – a short hand for paper repository and the namespace used for this tutorial code.

webmachine/scripts/new_webmachine.sh prp

After generating the code we build and run it: make ./start.sh

Note: Everytime the code is built, the changed modules are reloaded into the Erlang VM with hot code reloading. Because a full run of make checks all dependencies with rebar and is therefore comparatively slow. To speed up develpment it is recommended to run rebar compile

if no new dependencies were added and just the written Webmachine application needs to be compile.

Now the test should pass.

Adding the testrunner to the Makefile
For convenience it is recommended to add the api_tests.py to a new test directory at the application root. mkdir test The directory structure should look like:

tree -L 1 . ├── Makefile ├── deps ├── ebin ├── include ├── priv ├── rebar ├── rebar.config ├── src ├── start.sh └── test

In addition the testrunner is added to the Makefile as a new target:

Now type make api-tests to execute the test suite.

Configure Routes
For every request a Webmachine application decides which function in which module it has to call. This configuration is done in a file in priv/dispatch.conf. The syntax for this configuration can be found at the documentation.

In priv/dispatch.conf:

The first line tells Webmachine to look into the resource file prp_paper.erl to generate a response for a request to /paper/id. In addition, for a URL path /paper/foobar the part after the second slash, in this case "foobar" is accessible via the atom 'id'. With this help we can later get the id of a paper via:

Adding a storage layer
The service which is built in this tutorial requires a storage. A simple abstraction layer exists around it whose creation is not discussed in this tutorial. It uses an in-memory Mnesia database, a distributed database written in Erlang which is part of the Erlang distribution as well so there is no need to install drivers and databases.

Please get the source code from the Github repository. The relevant files are in src/prp_schema.erl and priv/prp_datatypes.hrl. The corresponding unit tests are located in test/prp_schema_tests.erl.

Writing a first test
At first a test method is added to the TestPaperAPI class:

Running the test via

make api_tests

should fail.

Implementing a GET response in HTML
As configured in dispatch.conf the request gets routed to src/prp_paper.erl. On application startup the init/1 method is called. It fills the in-memory Mnesia database wich is used for testing with inital data to test with (Fixtures).

The function content_types_provided/2 dispatches the request to that module to a function – in this case to_html/2. Erlang functions are referenced using the function_name/arity notation. to_html/2 means the function to_html with two arguments.

Turn on tracing for Debugging
Webmachine has a simple but effective way to debug an application. It is possible to trace the decisions made in the Webmachine core to get an idea where things go wrong. Let's go back to src/prp_paper.erl and turn on tracing. The init/1 function should now be:

src/prp_paper.erl

It is also necessary to add a new dispatch target to look at the traces via a web browser because Webmachine renders the decision flow into an HTML Canvas.

Add to dispatch.conf:

Now it is possibility to look at a trace after another run of the testsuite. It should look like the example trace in figure 1.

Making sure that not existing papers return a 404
If an entity doesn't exist it is necessary to return the status code 404 Not Found.

Running that test shows us that by default, Webmachine states that each resource is available. To change that behaviour we implement resource_exists/2 and return true/false if a paper exists.

src/prp_paper.erl Now, the test should pass.

Responding in different formats
In Webmachine it is possible to respond in different formats depending on the format desired by the client. The negotiation takes place in Mochiweb.

Requesting JSON
In addition to the already described response in HTML format a JSON response is implemented. A test describes the wanted behaviour.

As I am using an outdated version of the requests library the response is not parsed as JSON but interpreted as a string, which is not the way one should to it. In a current version of requests it is possible to use response.json to get the parsed JSON and compare it to a Python dictionary.

Implement a JSON Response for GET /paper/id
At first register a JSON producing function (in this case to_json/2) for a client requesting this format. It is specified in content_types_provided/2.

src/prp_resource.erl

If a client wishes another format than html or json it would get the proper HTML status code 415 Unsupported Media Type. To encode the paper data as JSON the mochijson library is used.

Now all tests should pass.

A PUT to /paper/id should add or modify a Paper with the given id
With PUT one can add a certain entity to a well-known location or modify it. This request should be idempotent which means that each identical request has the same effect as the first one. It is also important to note that an existing entity will be modified. If it is not possible than the response should be 409 Conflict. To make the application watch for conflicts is_conflict/2 must be implemented. In this example no conflict can occur. Every client is allowed to make any modification and the typical use case of non matching version numbers does not apply.

The wished behaviour is descibed in the following tests: A PUT should create a resource and update an existing one.

Running this test produces an assertion error because the application does not allow a PUT to this resource. To fix this it is necessary to modify allowed_methods/2 in src/prp_paper.erl.

In addition a handler for the PUT request has to be registered in content_types_accepted/2 in src/prp_paper.erl:

The explicit adding of JSON to the response body produces a 200 OK with the freshly created entity. If you prefer a 204 No Content just return RD instead of Resp.

The helper function paper2json/2 can also be used in to_json/2 follow the Don't Repeat Yourself principle. The function should be refactored to:

After another make api-tests all tests should be fulfilled.

A Note on Types
In this tutorial type specifications are used for custom helper functions. It is not necessary in Erlang and is just added to make the examples more clear. The notation reads as the following:

In a later section the type wm_reqdata is used which represents a request and its response. As Webmachine currently does not include full type specifications it is necessary to add a type declaration to deps/webmachine/wm_reqdata.hrl.

Or as a quick fix this declaration can be added into src/prp_paper.erl:

Respond with 201 Created instead of 200 OK
If the response should have no content but only a signal that the resource was created (status code 201 Created) it is necessary to explicitly add this information to the response. In src/prp_paper.erl modify from_json/2 to the following:

DELETE /paper/id should delete the record
A test for a permanent deletion of a paper with a given id could look like the following one. First, a paper is created, than deleted and than it should be not found by the application.

This test should fail bacause the status code of resp1 is 405 Method Not Allowed.

Implementing a DELETE
To make a DELETE succesful is required to first allow this HTTP method for a resource, in this case in src/prp_paper.erl.

After this a make api-tests fails with a status code 500 Internal Server Error because a DELETE is allowed but the Webmachine callback delete_resource/2 is not exported from the module. To fulfill Webmachine's expectation the function could be implemented like this the following:

The returned status (first entry in returned triple) marks if the delete was successful. If it was not, the application returns the status code 500 Internal Server Error.

POST to /paper adds a new Paper
While PUT is fine to add a paper with an id specified by the client it does not allow clients to just add a paper without knowledge about its URI. For this a POST is used because accoring to this table of RESTful HTTP methods a POST to a collection (in this case /paper) adds a new entity to it.

Like for the other methods a test is used to specify the wanted behaviour.

Because it is not known in the test which id the created paper has, we just assert that the content is not empty. With proper JSON parsing it would be much easier.

Adding a route to /paper
To /priv/dispatch.conf we add a route to allow a request to /paper: It is absolutely necessary to put that behind the first rule because the rules are matched from top to bottom which will result in a no-set id from the request path. The whole file should be like:

Implementing a POST which creates a Resource
Webmachine treats a POST to an URI like a PUT to this location if it is specified that a POST creates a resource. Therefore the function post_is_create/2 has to be implemented in src/prp_paper.erl and has to return true. In addition create_path/2 has to be written which produces the path onto which the POST is treated like a PUT. Please note that because post_is_create/2 returns true the response code automatically is set to 201 Created and the location header is set.

Unfortunately Webmachine does not rematch the dispatch rules on the created path which means that the created id is not accessible via wrq:path_info(id, RD) because this funciton still works with a normal PUT but returns undefined if the request is a POST. This means we have to modify the handling from_json/2 in src/prp_paper.erl.

A run of the test shows that this implementation was not sufficient. The test of the PUT still runs but POST fails with a 404 Not Found instead of a 200 OK. The reason is that per default a POST to a non existing resource is forbidden.

This problem is solved by implementing allow_missing_post/2 in src/prp_paper.erl.

Now all tests should pass.

Making sure that POST/PUT are well formed
Webmachine has a framework function malformed_request/2 which is called too erly (decision node B9 in the diagram ) to put in any application logic.

Any match out of data given by the API user might lead to a badmatch exception whch should be avoided because the crashing module will only be restarted if the number of crashes in a given interval are less that what is specified in its supervisor. With Webmachine the default is 10 times in 10 seconds (see line 57 in prp_sup.erl). Therefore one should check user input in production.

As an example it is shown how to check if data is provided to save.

The test should fail.

An implementation of how to check if a title is provided (remember, the paper consist of an id and a title) could look like the following code listing:

Now all test should pass again.

Are POST and PUT equal now?
It is also worth noting that because the recently implemented POST behaves like a PUT to the path created by create_path/2. But with one major difference: On a POST, create_path/2 is always called which means that a POST to /paper/id will be applied to /paper/generated_id. A test confirms this hypothesis.

Full Source Code Listing
test/api_tests.py

priv/dispatch.conf

src/prp_paper.erl

Ports to other Platforms
Webmachine originally is written in Erlang and can only be used from Erlang code. For using its priniciples it was ported to various other platforms.

Porting a Webmachine Application to Cowboy
In late 2011 the new HTTP server Cowboy was publicly released and gained a lot of momentum in the Erlang community because of its performance and its clean, small and modular codebase. The Cowboy authors reimplemented Webmachine's HTTP handling which makes it possible to easily port a Webmachine application to Cowboy.

The only thing to be changed is the handling of strings. Since Cowboy strictly uses binary strings (hence no list of chars) some type conversions are no longer necessary and string processing is sped up. In addition it may provide a generally even better performance as seen in a benchmark.

Sinatra and Webmachine
Sinatra can be considered a framework which addresses a similar class of problems – building a REST API. Since it is implemented in Ruby its interface and programming model is much different because it is essentially a domain-specific language. But both frameworks have in common that they are small and generic which gives a lot of flexibility and performance compared to full-stack frameworks. They should be used when there are specific needs and no scaffolding or MVC architecture is desired.

A main difference between Sinatra and Webmachine is the rich ecosystem of libraries and examples from the Ruby community while the Erlang world lacks a lot of reusable open source libraries e.g. for image processing, common cloud provider API and so forth.

Leveraging the Erlang Platform
Webmachine has some clear advantages for some use cases because of its Erlang implementation. As Erlang is intended for use in high performance, distributed and fault tolerant applications , a Webmachine application benefits of the already done work by the Erlang VM and the Open Telecom Platform (OTP), a collection of middleware libraries and applications. As seen in the code example there is little error handling because of the Erlang philosophy of "let it crash": A seldom error should not be handled in the code because it decreases readability and increases its complexity – it should just produce an uncatched runtime error. This optimistic programming can suprisingly lead to fewer errors and downtimes because of the use of supervisors. In Erlang, a supervisor is a process which starts, stops and monitors child processes. Child processes can be workers or other supervisors to build supervision trees. Processes are threads of execution inside the Erlang Virtual Machine called BEAM with separated heaps which are scheduled from the SMP emulator within the runtime. This means since Erlang programs are modeled in processes which send each other asynchronous messages, the runtime automatically utilizes all physical processors or processor cores. In addition the VM makes all I/O calls asynchronous and schedules other processes while waiting for the operating system.

In figure 3 is shown that a Webmachine application starts a supervisor (in this case prp_sup, which is defined in src/prp_sup.erl). The supervisor starts and monitors a process which interfaces between the Mochiweb server and Webmachine (mochiweb_webmachine) which starts and supervises all request acceptors. This means for each request an Erlang process is started which handles it and a crash is isolated in that process so it only affects one user and keeps the whole application running. But chances are high that the user with the crashing request doesn't notice the crash at all – the supervisor process, which traps that crash, captures the valuable state of the crashing process and restarts it with that information so nothing gets lost.

Conclusion
Webmachine is a great entry point to Erlang because it is a small and focused framework. Its aim to let users easily write a correctly behaving REST API is met. The graphical tracing to see how a request was handled in the framwework plus the user defined callbacks is a great way to debug and helps in many situations because it provides transparency to make the framework less magical. If Erlang might be not the best implementation choice a variety of Ports to other platforms are available.

It also is a mature framwork which is constantly tested due to the use in Riak and the backing from the company Basho.

However, there are some difficulties during development: The error messages are often only the erlang exception plus a complete print of the whole ReqData (the state passed in to every function) object which is clumsy, deeply nested, and mostly not helping at all. In addition it lacks of a variety of good examples and a sound documentation. Therefore it is often necessary to test the behaviour of the framework which makes a good testing toolchain essential (which holds true for every software project).

Another drawback is the inconsistency of types used in Webmachine and Mochiweb which makes type conversions often necessary. It would be great if Webmachine did type conversions to circumvent Mochiweb's non uniformity. It should provide bitstrings (String in a binary container via the bit syntax) which makes pattern matching in strings easier and string operations faster compared to the implementation of strings as lists of characters instead of a vector/array of characters which would allow $$O(1)$$ access instead of $$O(n)$$. But this datatype issue can be avoided by using the Cowboy webserver instead of Mochiweb.

Webmachine related documents online

 * – A blogpost explaining Bishop

Erlang online resources

 * – a good resource to learn Erlang

Books on Erlang/OTP


title: File:Screenshot-trace-POST-404.png


text: File:Webmachine-supervisor-chain.png

title: File:Webmachine-supervisor-chain.png


text:
Refresher/csharp/Delegates How and When

Presentation
How to create a guided tour such as this presentation?

Delegate: a class -- usable if declared and instantiated Delegate use: passed around as a parameter, and invoked by the receiving object Delegate example 1: success = MyAddressProvider.HandleCampaign(WhatToDoWithAddresses) Delegate example 2: MyMenuItem.Click += new System.Windows.RoutedEventHandlerMyMenuItem_Click)

Mobile version

title: Refresher/csharp/Delegates How and When


text: File:Screenshot-example-trace.png

title: File:Screenshot-example-trace.png


text:
Refresher/csharp/Singleton

Presentation
Singleton design pattern: interface allowing a class to enforce single instantiation C# singleton example: http://www.dotnetperls.com/singleton

Mobile version

title: Refresher/csharp/Singleton


text:
Refresher/SDLC

This is a refresher course for those who need to review basic knowledge of Software Development Life Cycle (SDLC).

Basic Concepts

 * Key development models: waterfall, spiral, evolutionary and agile
 * Key development phases: planning, implementation and deployment
 * Key planning activities: gathering, analyzing and estimating requirements
 * Key implementation activities: coding, testing and documenting
 * Key deployment activities: installation, customization and maintenance

FAQ

 * Effective use of a BA can give waterfall an advantage.
 * Audit proof means that agile is not an option.

Requirements

 * Non-functional requirement: Execution qualities and Evolution qualities
 * Execution qualities: observable at run time, e.g. security and usability
 * Evolution qualities: embodied in the software static structure, e.g. testability, maintainability, extensibility and scalability
 * High performance: C++ providing close to real time processing
 * High usability: best practices in UI, e.g. WPF
 * WPF business case: massive increase in testability through separation of program logic fron the UI
 * High security: SSL, DMZ, and a dozen other best practices in security
 * Techniques for requirements: user stories, functional specification, and UI mockups
 * Requirements tracing: documenting the life of and tracking the changes to requirements
 * Forward tracing: ability to show system impact when a requirement is changed
 * Backward tracing: ability to show user impact when the system is changed
 * Sample requirements tool: Open Source Requirements Management Tool

Requirements - Part 2

 * How to deal with changing requirements: agile -- Scrum & XP
 * Sources for requirements: stakeholders and best practices
 * Requirements prioritization techniques: MoSCoW Analysis -- Must, Should, Could and Won't be part of the final solution.
 * User responsibilities in requirements process: requirements articulation and validation
 * Customer responsibilities in requirements process: requirements gathering and prioritization
 * Developer responsibilities in requirements process: requirements analysis and definition
 * Incomplete or incomprehensible requirements: ask for clarification, or approval of a revised version

Functional Design

 * Metaphor: the use of a vehicle (e.g. stage) to visualize a tenor (e.g. the world)
 * Design: relationship between users with problems to solve and designers with solutions to offer
 * Successful metaphor examples are a menu or a mouse
 * Progress bar: reducing the user's perception of waiting
 * Dropdown: big list in small space
 * Data entry QA measures: show examples, validate entry, check DB, minimize typing, progressive lookup, autocomplete
 * Sample prototyping techniques: sequence diagram, UI mockups, and throw-away code
 * How to anticipate user behavior: modeling based on usage and prediction based on models
 * Access to countless features: menu controls, ribbon interfaces, query language
 * Editor for few items of many fields: listbox for items, tab controls for fields
 * Editor for many items of few fields: use grid control or add logic for grouping, paging, filtering or autocomplete
 * Too many colors: untidy, unprofessional and hard to read
 * Web environment: easier to deploy, more collaboration, slower performance
 * Desktop environment: harder to deploy, less collaboration, faster performance

OOP

 * Programming paradigm (fundamental style): OOP, imperative (emphasizing state changes) and functional (emphasizing use of functions)
 * Functional programming example: int sum = Enumerable.Range(1, 9).Where(i => i % 2 == 0).Sum;
 * Imperative programming example: for (int i = 1; i < 10; i++) if (i % 2 == 0) sum += i;
 * OOP: using objects in programming with object data fields, methods and their interaction
 * OOP features: data abstraction, encapsulation, message passing, modularity, polymorphism, and inheritance
 * Abstraction: what to expose, what to hide
 * Data abstraction: factoring out details
 * Information hiding: the principle of segregation of the design decisions
 * Information hiding example: Weights.Compare(Weight argWeight1, Weight argWeight1)
 * Encapsulation: enclosing in a capsule or object, a technique in information hiding
 * Encapsulation example: Box box1 = new Box; if (box1.Heavier(box2)) { }
 * Messaging passing: objects or processes can wait for messages from others
 * Process synchronization: multiple processes agreeing to a sequence of action
 * Modularity: separation of concerns (features and behaviors)
 * Coupling: degree of interdependencies between modules or classes
 * Cohesion: how much functions or methods within a module are related to another
 * Low coupling: classes should loosely dependent like lego pieces
 * High cohesion: methods highly related like jigsaw puzzle pieces
 * Low coupling and high cohesion: classes like lego, methods like jigsaw puzzle
 * Polymorphism: objects from different types responding to calls by the same name, e.g. operator overloading for addition
 * Inheritance: code reuse by establishing a subtype from an existing object
 * Inheritance example: class Employee extends Resident extends Person
 * Method overriding: providing a method with same name, signature, and return type as that of the parent class
 * Keyword 'internal' in C#: Friend in C++ is not your friend

Technical Design

 * Concurrency control: pessimistic or optimistic locking
 * Pessimistic locking: immediate locking upon request
 * Optimistic locking: clearing at commit time
 * Software design patterns: solution template for many situations
 * OO design pattern: relationships and interactions between classes or objects
 * Mutable: prone to frequent change
 * Creational design patterns: Lazy initialization, Multiton, Singleton, etc.
 * Structural design patterns: Adapter, Composite, Decorator, etc.
 * Behavioral design patterns: Chain of responsibility, Iterator, Memento, etc.
 * Concurrency design patterns: Lock, Scheduler, Thread pool, etc.
 * Iterator design patterns: Collections -- List
 * Stateless protocol: each request a transaction independent of previous requests
 * Stateless object: no attributes, only methods, lower invocation overhead
 * Multi-tier architecture: presentation, application processing, and data management are separate processes
 * Business Logic Layer (BLL): business process objects and business entities
 * Stateless business layer: minimal overhead for long-running transactions
 * Entity Data Model (EDM) diagrams: scalar properties, navigation properties, etc.
 * Sequence diagram: interaction diagram showing how processes operate with one another and in what order
 * ArchiMate: an open and independent enterprise architecture modeling language
 * Component-based design (CBD): a reuse approach to defining, implementing and composing loosely coupled independent components into systems
 * Software component: a software package, a Web service, or a module that encapsulates a set of related functions
 * Service-orientation: a design paradigm to build computer software in the form of services
 * Service-oriented architecture: a set of principles and methodologies for designing and developing software in the form of interoperable services
 * SOA principles: reuse, granularity, modularity, composability, componentization and interoperability
 * CBD or SOA: application of OOP at a higher level, e.g. to encapsulate a service as provided by an independent vendor

Construction

 * How to handle error situations: Identify and unit-test normal error conditions (positive, negative and exception). Wrap all in try and catch blocks, ending in a generic Exception block.
 * TDD: tiny cycle repetition of red, green and refector -- failing test script, code to pass, refactor to standards
 * XP key principles: rapid feedback, incremental change and assuming simplicity
 * Code review: systematic examination of source code through peer review
 * Code review tools: style checkers, static checkers, unit-testing suites
 * Review forms: pair programming, informal walkthroughs or formal inspections
 * Essential tools outside of IDE: version control, scripting languages, google, unit testing frameworks, continuous integration systems
 * Safe and fast: basic security, time complexity, then micro improvement

Abstract and Interface

 * Abstract class (in C++, pure virtual method): blueprint for a class without any implementation and thus cannot be instantiated
 * Abstract class methods: not all must be abstract, some can be concrete
 * Abstract class required: when at least one of the methods in the class is abstract
 * Abstract method: require non-abstract derived classes to provide their own implementation of this method
 * Interface class: an abstract class with public abstract methods all of which must be implemented in the inherited classes
 * Interface class methods: all must be abstract and public and thus accessibility modifiers not needed
 * Multiple interfaces: can be inherited
 * Namespace class: classes are declared inside a namespace

Delegate and Polymorphism

 * Polymorphism or Delegate: method overloading or method passing
 * Late binding: method looked up by name at run-time and exact behavior determined at run-time
 * Early binding: method name and signature stored in the virtual method table (v-table) at compile time
 * Polymorphism: objects from different types responding to calls by the same name, e.g. operator overloading for addition delegate (function pointers in C++): an object encapsulates reference to a method
 * multicast delegate: a delegate that points to and eventually fires off several methods
 * Delegate: a class -- usable if declared and instantiated
 * Delegate use: passed around as a parameter, and invoked by the receiving object
 * Delegate example 1: success = MyAddressProvider.HandleCampaign(WhatToDoWithAddresses)
 * Delegate example 2: MyMenuItem.Click += new System.Windows.RoutedEventHandlerMyMenuItem_Click)

Construction - Part 4

 * Static class: for objectless methods
 * Singleton design pattern: interface allowing a class to enforce single instantiation
 * Anticipating changing requirements: unit test suites, in-code comments, object-oriented design
 * Coding process: study the requirement, figure out an approach, create a unit test, code to pass, commit, pass through code review, refactoring, commit again, internal release, pass through QA challenges

Algorithms

 * Even number if (number % 2 == 0)
 * Odd number if (number % 2 != 0)
 * X is power of 2 if ((x != 0) && ((x & -x) == x))
 * Middle item of a string LinkedList: mylist.ElementAt(mylist.Count/2)
 * Regular expression in C#: Regex Replace FormatWith in correct syntax
 * Sample recursive solution: private void ExpandNode { foreach (TreeViewItem node in Nodes) { ExpandNode(node); } }
 * SortedList: mySL = new SortedList; mySL.Add(key1,value1);
 * Hashtable: openWith = new Hashtable; openWith.Add("txt","notepad.exe");
 * Hashtable speed: faster than SortedList
 * String reversal: private static string rwr(string argSource, int argLen) { if (argLen == 1) return argSource; else return rwr(argSource.Substring(1, argSource.argLength-1),--argLen) + argSource[0].ToString; }
 * Find duplicate value: map int array to HashTable
 * Travelling salesman problem: a special case of the Traveling purchaser problem
 * Traveling purchaser problem: route with minimum combined cost of purchases and travelling given marketplaces, travel costs, available goods and their prices

Data Structures

 * Structure of a subway system: object classes for railways, stations and trams
 * RGB triplet: efficient representation for color value
 * Queue: FIFO enqueued then dequeued
 * Stack: LIFO pushed then popped
 * Scalable Vector Graphics (SVG): a family of specifications of an XML-based file format for two-dimensional vector graphics, both static and dynamic (i.e., interactive or animated)
 * C#: personally preferred language for writing complex data structures
 * 21 in decimal: 15 in hex or 10101 in binary
 * XML for sport competition:
 * Universal Character Set (UCS): a standard set of characters upon which many character encodings are based
 * UTF-8 (UCS Transformation Format—8-bit): variable-width encoding to represent every character in the Unicode character set
 * Unicode: a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems.

Testing

 * Regression test: testing that looks for regressions after enhancement
 * Requirements traceability matrix: completeness of many to many relationship between two baselined documents
 * Test Coverage Matrix: Feature, Module, Case Type, Test Case
 * Case Type: Default Case, Negative, Boundary
 * Integration test: unit test with dependencies between business and data layers
 * Unit test: integration test using mocked up business objects and database mockups
 * Unit testing framework: toolset essential for testing the code quality
 * Integration and configuration errors: types of problems frequently encountered in production
 * Code coverage: a measure used in software testing showing the code proportion tested
 * Types of code coverage: function, statement, decision, etc.
 * Black-box testing: test the functionality of an application
 * White-box testing: test internal structures of an application
 * Functional testing: a type of black box testing that bases its test cases on the specifications
 * Exploratory testing: a black box testing technique, free-lance testing, cognitive engagement of the tester
 * Test suite: a collection of test cases showing a specified set of behaviors in the software
 * Test case: a set of conditions or variables to be considered in testing
 * Test plan: definition of workflow for testers
 * Test organization: based on available testing human resources, including developers available for testing
 * Web testing: basic functionality, security testing, load testing, performance testing, etc.
 * Ecommerce smoke test: at first round-trip testing involving all vendor web services
 * Reducing acceptance testing surprises: involve the customer in design of acceptance test

Maintenance

 * Product update: service interruption should be avoided or announced in advance, backward compatibility, database conversion
 * Debug strategy: isolating the code, adding trace logic, and optimizing problem recreation
 * Regression tests: making sure other parts, components not broken by the new code
 * Sandcastle: a documentation generator from Microsoft via reflection information of .NET assemblies and XML documentation comments found in the source code of these assemblies.
 * More easily maintainable: follow best practices and internal standards for coding, logging, commenting, etc. Using OOP plays a major role.
 * Debug in production: turn on debug logging, monitor the database in real time
 * Load balancing: methodology to distribute workload across multiple devices to achieve optimal resource utilization, maximize throughput, minimize response time, and avoid overload
 * Types of Load Balancing: DNS load balancing, Bridged load balancing, and Routed load balancing
 * Maintenance most expensive: each change goes through the whole SDLC yet requires all-out regression testing
 * Reengineering: examination and alteration of a system to reconstitute it in a new form
 * Reverse engineering: discovering the technological principles of a system through analysis of its structure, function, and operation

Configuration Management

 * Baseline: the marking of a significant system state where we can go back to
 * Freezing: versioning the source code as well as the database
 * Under version control: source code, tests, database and other scripts, sample data, documentation, anything changed by developers over time
 * Version control systems (VCS): letting team members know who changed what
 * VCS Tag: a static snapshot
 * VCS Branch: for development outside the trunk
 * Changes to Technical Documentation: tracked under VCS, maintained on enterprise wiki
 * Redmine: free and open source, web-based project management and bug-tracking tool
 * Patch management: what patches should be applied to which systems at a specified time
 * New version: pushing forward, shooting for new heights
 * New release: pushing backward, aiming for stability
 * Text file changes: versioned by line
 * Binary file changes: full replacement

Project Management

 * Iron triangle in software development: scope, time and cost
 * Scope: features, functionality
 * Time: schedule
 * Cost: resources, budget
 * Estimates: by team members
 * Deadline: by the management team
 * Agile: iterative and incremental development
 * Iterations and Increments: periodic evaluation of new deliverables
 * Work breakdown structure (WBS): deliverable-oriented decomposition of a project into smaller components
 * Rolling wave planning: progressive elaboration to add detail to the Work Breakdown Structure (WBS) on an ongoing basis
 * Burn down chart: graphical representation of work left to do versus time
 * Dynamic systems development method (DSDM): generic approach to project management and solution delivery
 * PRojects IN Controlled Environments 2 (PRINCE2): a structured project management method endorsed by the UK government as the project management standard for public projects.
 * Scrum: an iterative and incremental agile software development method for managing software projects and product or application development
 * Customer wants too much: show them alternative outcomes and ask for their help with prioritization

title: Refresher/SDLC


text:
Refresher/SDLC/Introduction

Presentation
How to create a guided tour such as this presentation?

Mobile version

title: Refresher/SDLC/Introduction


text:
Refresher/SDLC/Topic List

Presentation
Basic Concepts FAQ References Requirements Requirements - Part 2 Functional Design OOP Technical Design Construction Abstract and Interface Delegate and Polymorphism Construction - Part 4 Algorithms Data Structures Testing Maintenance Configuration Management Project Management

Mobile version

title: Refresher/SDLC/Topic List


text:
Refresher/SDLC/Basic Concepts

Presentation
Key development models: waterfall, spiral, evolutionary and agile Key development phases: planning, implementation and deployment Key planning activities: gathering, analyzing and estimating requirements Key implementation activities: coding, testing and documenting Key deployment activities: installation, customization and maintenance

Mobile version

title: Refresher/SDLC/Basic Concepts


text:
Refresher/SDLC/FAQ

Presentation
Effective use of a BA can give waterfall an advantage. Audit proof means that agile is not an option.

Mobile version

title: Refresher/SDLC/FAQ


text:
Refresher/SDLC/References

Presentation
Mobile version

title: Refresher/SDLC/References