Stuff about Software Engineering

Author: Peter Birkholm-Buch (Page 10 of 17)

Kom og mærk

For sent
Mine grådige drømme
Flød som vældige strømme
Ind til helvedes port
Og mærk mine verdener der ramler
Mine hænder der famler
Kom og mærk

Og i mens at jorden drøner på min mælkevej
Kysser jeg dit navn
Kysser jeg dit navn

Og smag
Smag på mørket en tavs nat
Ligeså tro som en vild kat
Kom og smag
Og se
Alle stjernerne falder
Med min stemme der kalder
Her fra helvedes port

Og i mens at jorden drøner på min mælkevej
Kysser jeg dit navn
Kysser jeg dit navn

Og i mens at jorden drøner på min mælkevej
Kysser jeg dit navn
Kysser jeg dit navn
Kysser jeg dit navn

For sent
Mine grådige drømme
Flød som vældige strømme
Ind til helvedes port

Og i mens at jorden drøner på min mælkevej
Kysser jeg dit navn
Kysser jeg dit navn

Og i mens at jorden drøner på min mælkevej
Kysser jeg dit navn
Kysser jeg dit navn
Kysser jeg dit navn

Cure4you–din sundhedsportal!?

Jeg har ikke været til min læge i 100 år. Sidst jeg skulle til lægen skulle man ringe og bestille tid hos en sekretær. Nu skal man bruge en formular online (jubii).

Når man endelig er logget ind bliver man mødt af en side der ligner noget fra østtyskland:

image

Her kan man så godt som intet andet end at klikke videre til Cure4you Sundhed.

Nu kan det godt være at det bare er mig, men Cure4you lyder mere som noget man får i spam sammen med 100% mere nydelse og størrelse.

Nå videre til Cure4you og så mødes af en portal der på nærmest umulig vis lykkedes med at undergå ovenstående i design:

image

Hvor har jeg f.eks. fået Per Stig Møller som læge? Sådan så han da ikke ud sidste gang…

Når man så vælger at bestille en ny tid bliver man smidt tilbage til Østtyskland…

image

Suk, velkommen til selvbetjening anno 2011.

Socialt valgeksperiment

Så er der folketingsvalg 2011 og de sociale medier er allerede ved at flyde over med kommentarer af mere eller mindre lødig karakter.

For at gøre det nemmere at kende forskel på farven af tweets, indlæg og andre opkast vil jeg foreslå at alle skifter deres billede ud med et ikon der angiver det parti de vil stemme på.

Jeg har til formålet sakset lidt i DR’s hjemmeside og lavet nedenstående ikoner (i alfabetisk rækkefølge):

ABCFIKOVØ

Alternativt kan man hente fra Skydrive: https://skydrive.live.com/#!/?cid=6af4c8ec7575374c&sc=documents&uc=9&id=6AF4C8EC7575374C%21846

Jeg har skiftet til (ugens) parti på twitter, facebook og G+.

God fornøjelse og godt valg.

SharePoint 2007 Content Query Web Part Resources

Basic Usage

Styling

Custom Queries

Programmatic

Cool Examples That Tie It All Together

Enhanced CQWP’s

When to use a Database, Sharepoint, or Wiki

Notice: I wrote this when I was still working for NNIT, but the principles still apply.

Eli Robillard wrote a post on “When to use a database, SharePoint, or wiki” with the following highlights:

A database stores structured data. The structure is typically designed and owned by an individual. Politically, it’s a dictatorship. Line-of-business applications which gather and distribute raw data are typically associated with databases.

Sharepoint provides webs to store lists and documents. Think of this as loosely-structured data. Sharepoint lets you control this data with versioning, backup and recovery, workflow, security, policies and auditing. The structure might be seeded by an individual, but ownership is distributed. Sharepoint should be designed to unfold according to to will of the distributed owners. Politically, Sharepoint provides representative leadership like a parliamentary system though the leaders are typically appointed rather than elected. Sharepoint is used by “information workers” to create, manage, and publish information typically stored in lists and documents. Sharepoint is used as an interface to databases. Sharepoint is a social tool used to recognize and reinforce relationships among people. Through either Sharepoint’s business intelligence capabilities or its integration with Reporting Services, Sharepoint can report on data from structured and loosely structured data stores. Sharepoint can index and provide search for structures, loosely structured, and unstructured data stores.

A Wiki provides webs to store text with embedded references to media. This is unstructured data. Wiki content can be seeded with the intention to unfold according to some master design, but politically, it’s anarchy. A Wiki allow control through versioning and moderation. A Wiki is well-suited for collaborative documentation.

I the years to come eS will hopefully get the chance to convert a lot of Lotus Notes databases to Sharepoint. Each time you have to stop and figure out which one or all of the above mentioned data storage mechanisms you have to use in order to convert the functionality of the Lotus Notes database to Sharepoint.

Lotus Notes databases basically comes in two flavors:

  1. Plain data (one or more tables) with views and no LotusScript code – basically it’s a spreadsheet with alphanumerical data
  2. Data with views, references and business logic in LotusScript code – basically it’s an application

In the first case it’s a no brainer to just convert the database into a WSS site with the data in custom lists combined with custom views and perhaps a few Web Part Pages thrown in with connected Web Parts that displays data. This is exactly what JPTL is doing right now with a Lotus Notes database from Novo Nordisk Stakeholder Relations.

In the second case it’s much more difficult and each Lotus Notes database or more appropriately Lotus Notes Application has to be thoroughly analyzed. Once you have a good understanding of the business requirements and these was implemented in the Lotus Notes Application – stop and take a look at the slide below.

Your job now is to transform the business requirements from the square Lotus Notes approach to the round Sharepoint approach.

Can you fulfill the same surface area of business requirements with standard Sharepoint functionality? This is where creative use of lists (custom, tasks, wikis and so on), document libraries, views, Web Parts, workflows and Web Part Pages comes in.

Obviously there will be cases where it’s just not possible to get the job done and you’ll have to revert to a normal application design with ASP.NET (remember that Web Parts in WSS3.0 is a ASP.NET2.0 Web Part) and a backend database – but hopefully it will won’t be very often. You could take the middle road and use a list for storage and you could even use SilverLight for the UX instead of ASP.NET.

Transformation af forretningskrav med fast overfladeareal

Jeg har gennem tiden skrevet et utal af tilbud baseret på udbudsmateriale, der var mere eller mindre gennemarbejdet.

Desværre har de fleste kravspecifikationer en stor fejl:

  1. De funktionelle krav har været skrevet i hvordan-form i stedet for hvad-form

Når man skriver kravspecifikation for funktionelle krav, er det en kunstform kun at beskrive det som systemet skal kunne (altså selve forretningskravene) og ikke hvordan systemet forventes at løse disse krav.

Når funktionelle kravspecifikationer er skrevet i hvordan-form giver det store vanskeligheder at udnytte standardsystemer til at løfte krav der dybest set kan håndteres af standardfunktionalitet, fordi der i kravene er indlagt krav til proces og præsentation.

Capture

Det bedste i sådan en stituation er at indgå i tæt dialog med kunden og gennem workshops søge at forstå selve hvad-essencen i kravene. Herefter er det så muligt via prototyping at vise hvordan krav kan løftes f.eks. via standardfunktionalitet.

Jeg kalder processen for “Transformation af forretningskrav med fast overfladeareal”. Det handler i virkeligheden bare om at forstå de basale forretningskrav og vise hvordan de kan løftes nemmest via standardfunktionalitet. Jeg har gennemført workshops med dette formål med masser af kunder. Senest med Københavns Universitet, hvor vi fik reduceret omkostningerne til projektet med næsten 25% ved, at løse krav med standardfunktionalitet, i stedet for at kode en løsning der opfyldte de oprindelige krav 100% uden brug af standardfunktionalitet.

Processen kan bruges i alle situationer, hvor der er tale om en løsning, hvor det er muligt at bruge et standardsystem til at løse store dele af forretningskravene.

How to navigate an OData compliant service

The Service:

It all starts with a Data Service hosted somewhere:

http://server/service.svc

Basic queries:

You access the Data Service entities through resource sets, like this:

http://server/service.svc/People

You request a specific entity using its key like this:

http://server/service.svc/People(16)

Or by using a reference relationship to something else you know:

http://server/service.svc/People(16)/Mother

This asks for person 16’s mother.

Once you have identified an entity you can refer to it’s properties directly:

http://server/service.svc/People(16)/Mother/Firstname

$value:

But the last query wraps the property value in XML, if you want just the raw property value you append $value to the url like this:

http://server/service.svc/People(16)/Mother/Firstname/$value

$filter:

You can filter resource sets using $filter:

http://server/service.svc/People?$filter=Firstname  eq ‘Fred’

Notice that strings in the filter are single quoted.

Numbers need no quotes though:

http://server/service.svc/Posts?$filter=AuthorId eq 1

To filter by date you have identity the date in the filter, like this:

http://server/service.svc/Posts?$filter=CreatedDate eq DateTime’2009-10-31′

You can filter via reference relationships:

http://server/service.svc/People?$filter=Mother/Firstname eq ‘Wendy’

The basic operators you can use in a filter are:

Operator Description C# equivalent

eq

equals

==

ne

not equal

!=

gt

greater than

>

ge

greater than or equal

>=

lt

less than

<

le

less than or equal

<=

and

and

&&

or

or

||

()

grouping

()

There are also a series of functions that you can use in your filters if needed.

$expand:

If you want to include related items in the results you use $expand like this:

http://server/service.svc/Blogs?$expand=Posts

This returns the matching Blogs and each Blog’s posts.

$select:

Some Data Services allow you to limit the results to just the properties you require – aka projection – for example if you just want the Id and Title of matching Posts you would need something like this:

http://server/service.svc/Posts?$select=Id,Title

You can even project properties of related objects too, like this:

http://server/service.svc/Posts?$expand=Blog&$select=Id,Title,Blog/Name

This projects just the Id, Title and the Name of the Blog for each Post.

$count:

If you just want to know how many records would be returned, without retrieving them you need $count:

http://server/service.svc/Blogs/$count

Notice that $count becomes one of the segments of the URL – it is not part of the query string – so if you want to combine it with another operation like $filter you have to specify $count first, like this:

http://server/service.svc/Posts/$count?$filter=AuthorId eq 6

This query returns the number of posts authored by person 6.

$orderby:

If you need your results ordered you can use $orderby:

http://server/service.svc/Blogs?$orderby=Name

Which returns the results in ascending order, to do descending order you need:

http://server/service.svc/Blogs?$orderby=Name%20desc

To filter by first by one property and then by another you need:

http://server/service.svc/People?$orderby=Surname,Firstname

Which you can combine with desc if necessary.

$top:

If you want just the first 10 items you use $top like this:

http://server/service.svc/People?$top=10

$skip:

If you are only interested in certain page of date, you need $top and $skip together:

http://server/service.svc/People?$top=10&$skip=20

This tells the Data Service to skip the first 20 matches and return the next 10. Useful if you need to display the 3rd page of results when there are 10 items per page.

Note: It is often a good idea to combine $top & $skip with $orderby too, to guarantee the order results are retrieved from the underlying data source is consistent.

$inlinecount & $skiptoken:

Using $top and $skip allows the client to control paging.

But the server also needs a way to control paging – to minimize workload need to service both naive and malicious clients – the OData protocol supports this via Server Driven Paging.

With Server Driven Paging turned on the client might ask for every record, but they will only be given one page of results.

This as you can imagine can make life a little tricky for client application developers.

If the client needs to know how many results there really are, they can append the $inlinecount option to the query, like this:

http://server/service.svc/People?$inlinecount=allpages

The results will include a total count ‘inline’, and a url generated by the server to get the next page of results.
This generated url includes a $skiptoken, that is the equivalent of a cursor or bookmark, that instructs the server where to resume:

http://server/service.svc/People?$skiptoken=4

$links

Sometime you just need to get the urls for entities related to a particular entity, which is where $links comes in:

http://server/service.svc/Blogs(1)/$links/Posts

This tells the Data Service to return links – aka urls – for all the Posts related to Blog 1.

$metadata

If you need to know what model an OData compliant Data Service exposes, you can do this by going to the root of the service and appending $metadata like this:

http://server/service.svc/$metadata

This should return an EDMX file containing the conceptual model (aka EDM) exposed by the Data Service.

« Older posts Newer posts »

© 2026 Peter Birkholm-Buch

Theme by Anders NorenUp ↑