<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Espeo Software &#187; english</title>
	<atom:link href="http://www.espeo.pl/kategoria/blog/english/feed" rel="self" type="application/rss+xml" />
	<link>http://www.espeo.pl</link>
	<description>Oprogramowanie na zamówienie - aplikacje inter/intranetowe, desktop, mobilne. Wykorzystujemy technologię Java, Java EE, Flex, Grails</description>
	<lastBuildDate>Fri, 11 May 2012 15:11:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Authentication in AngularJS (or similar) based application.</title>
		<link>http://www.espeo.pl/2012/02/26/authentication-in-angularjs-application</link>
		<comments>http://www.espeo.pl/2012/02/26/authentication-in-angularjs-application#comments</comments>
		<pubDate>Sun, 26 Feb 2012 18:16:02 +0000</pubDate>
		<dc:creator>Witold Szczerba</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[technologia]]></category>
		<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.espeo.pl/?p=4475</guid>
		<description><![CDATA[Hello again, today I would like to write a little bit about how am I handling authentication in an application front-end running inside web browser, using AngularJS. Traditional server &#8216;login form&#8217;? Well&#8230; no, thank you. At the beginning, I did not realize that traditional and commonly used form based authentication does not suit my client-side application. The major problem lies in a key difference between traditional &#8211; server-side, and client-side applications. In server-side applications, no one else but server itself knows user state and intentions, whereas in client-side applications this is no longer true. Let&#8217;s take a look at a sample server-side web application flow of events: user asks for a web page: something.com, server generates markup and sends it back, user chooses to visit a secured sub-page: something.com/secured, server figures out that user does need to authenticate itself, so it: remembers what user asked for, responds with a login form (or a redirect to) instead of a requested content, once user sends credentials back to the server, it serves what user initially asked for, user keeps visiting secured pages and filling secured forms until their authorization expires (for whatever reason), server once again responses with a login form and once user provides credentials, server redirects them back whenever they wanted to go. Same application, but different flow: user asks for: something.com/secured/formXyz, server sends a login form, user logs in, fills a long and complicated form, but they are doing it so long that theirs session expires, user submits a form, but since the session is not valid anymore, login screen appears, once user logs in, server can process the submitted form, no need to re-enter everything again. Now let&#8217;s see how it is in client-side application, running inside a web browser: user types somewhere.com in an address bar, browser sends a &#8220;Content-Type: text/html&#8221; request, server sends back a page with client-side application code, code starts to execute and asks for user name (e.g. it wants to display user name in the upper right corner), so next request is issued, e.g.: &#8220;Content-Type: application/json&#8221; traditional login form does not make sense here, as browser is not requesting a web page, but some data instead. Something is not right here. OK, so let&#8217;s try other way around: user asks for somewhere.com entire site is hidden behind a login form authentication mechanism, so instead of an application, user is presented a form, so they can provide credentials, once user submits, the originally requested page is provided, so as it was before: application loads, issues a new data request (application/json) for user name and receives it back, everything is nice so far&#8230; but let&#8217;s assume that our session expires (for whatever reason) while we are in the middle of a long and complicated form&#8230; Guess what? We are exactly in the same place as before: our application is up and running, but our session is not valid any more and form based authentication is useless at this point. Or isn&#8217;t it? Let&#8217;s try to adapt. Using AngularJS, we can simply write an http interceptor. Such a interceptor can check every response and once it detects a login form, we can&#8230; well&#8230; We can redirect ourselves to a login page, but this is a complicated task, because server does not know where we are at the moment (or to be more precise: what is our state, what were we doing). Remember, client-side application is client-side, how is server supposed to figure out what to do next, after we logged in? From server-side point of view we are sitting on one page all the time. We can be smarter: we can bring an IFRAME to life, it will show login form. But this is also complicated: we have to figure out somehow what is happening inside such an IFRAME. How to detect successful login? Is it easy? Hard? Not that hard but tricky? Of course everything is doable, but after investigation, I did something else. Very simple and clean, but requires server side adjustments. Solution: client-side login form when server answers: status 401. My solution assumes the following server side behaviour: for every /resources/* call, if user is not authorized, response a 401 status. Otherwise, when user is authorized or when not a /resources/* request, send what client asked for. No login forms, but we still need some login URL, so our application can send login and password there. Plain-old cookie based sessions? Why not, they work for me, web browsers and application servers handle them automatically by default. AngularJS has a $http service. It allows custom interceptors to be plugged in: Nice thing is that from &#8216;response&#8217; parameter we can rebuild the request. To fully understand how the $http interceptor works, we need to understand $q. The goal is to be able to: capture 401 response, save the request parameters, so in the future we can reconstruct original request, create and return new object representing server&#8217;s future answer (instead of returning the original failed response), broadcast that login is required, so application can react, in particular login form can appear, listen to login successful events, so we can gather all the saved request parameters, resend them again and trigger all the &#8216;future&#8217; objects (returned previously). Nice thing about the solution above is that when you request something, but server responds with status 401, you do not have (and you cannot) handle this. Interceptor will handle this for you. You will eventually receive the response. It will come as nothing had happened, just a little bit later (unless user won&#8217;t provide valid credentials). OK, so here is a bit of code. I wanted to provide a working example with a login window, using jsfiddle.net, but have to postpone it. It is getting a little bit late now, so I am finishing this entry here. I hope you like it :)]]></description>
		<wfw:commentRss>http://www.espeo.pl/2012/02/26/authentication-in-angularjs-application/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>AngularJS is going to be released soon!</title>
		<link>http://www.espeo.pl/2012/02/07/angularjs-is-going-to-be-released-soon</link>
		<comments>http://www.espeo.pl/2012/02/07/angularjs-is-going-to-be-released-soon#comments</comments>
		<pubDate>Mon, 06 Feb 2012 23:04:30 +0000</pubDate>
		<dc:creator>Witold Szczerba</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[technologia]]></category>
		<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.espeo.pl/?p=4360</guid>
		<description><![CDATA[Last year, I was working, with my friend, on a prototype of an application using AngularJS. The AngularJS project&#8217;s goal is, in few words, to make a web browser a full-featured application environment. Miško Hevery (do I have to introduce him?), AngularJS project founder describes the project like this: What HTML would have been had it been designed for web apps. At that time, Angular team was developing 0.9 branch. That was my first attempt to create a real client-side application working in browser environment. Web Server is providing only application code (including static markup templates) and data. There is no server-side HTML generation. That was just a prototype of an application, unfortunately the project never fired up. Too bad, but I do not regret, because I gained a new experience. One year passed. During that period, I was following the AngularJS project almost non stop. I really like the way it is growing, together with great community. Right now (beginning of February, 2012) the AngularJS team is working on the final 0.10.x release, which according to the schedule, is going to be the release candidate of the long-awaited version 1.0. Since few weeks, I am a tech-leading brand new project at Espeo Software. AngularJS plus Java back-end (my prototype used Java EE 6, but the one picked for this project is backed by Spring Framework 3.1). I think it is nice opportunity to share some tips (or tricks?) with you. I do not have any agenda, but in my next blog entry, I would like to cover authentication and authorization. I will describe how am I dealing with it on the server and client-side. Stay tuned :)]]></description>
		<wfw:commentRss>http://www.espeo.pl/2012/02/07/angularjs-is-going-to-be-released-soon/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open Flash Chart 2 on Grails</title>
		<link>http://www.espeo.pl/2010/09/10/open-flash-chart-2-on-grails</link>
		<comments>http://www.espeo.pl/2010/09/10/open-flash-chart-2-on-grails#comments</comments>
		<pubDate>Fri, 10 Sep 2010 18:40:32 +0000</pubDate>
		<dc:creator>Sylwia Rogowicz</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[technologia]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://blog.espeo.pl/?p=343</guid>
		<description><![CDATA[Demand for a new feature for our accounting office management application  appeared recently. Service is made in Grails, so  I started from searching charts plugins for this framework. I could choose between Google Chart plugin, JFreeChart and Open Flash Chart. The last one really took my attention &#8211; you know, nice flash effects possible. I never used Open Flash Charts before and  decided to spend one afternoon and play with it. It was very easy to install and take into use, just by following the short instruction from http://mybytes.wordpress.com/2009/03/09/grails-open-flash-chart-06-is-out It is suggested there to see demo, so I checked out the plugin from svn and watched the samples.  Library gives us many possible charts to present data . I started to prepare 3 test charts using API in Java for Open Flash Chart 2 , same charts I will probably need in my project in the future: Pie chart, Horizontal Bars and more complex one: Bars and Lines presented at one chart. Pie went smoothly  and looked tasty, the most complex chart also, but I was not able to prepare labels for y axis for horizontal bars. It confused me, I found a package with fix called   OFC2Patches-DZ-Ichor.zip on this site http://www.ofc2dz.com/index.html#Examples Hints ( and patches) there are very useful if you have some problems with library. Of course when one problem was solved, the ready made chart &#8211; the more complex one stopped working properly with a new patch for the library. This is code sample for the complex one – 3d bar and line with dots using OFChart library, as you can notice it is easy to use and readable. Everything is fine as long as you are stopped by some more complex feature or bug. Why not to omit this and take advantage of groovy? An swf file gets data that are going to be presented as json data and we have such a groovy2json converter on the board.  Manipulating Lists and Maps we can prepare even the most complicated json file.  I do not need any fixes or patches then. The same example with Lists and Maps below: In both cases chart looks the same of course]]></description>
		<wfw:commentRss>http://www.espeo.pl/2010/09/10/open-flash-chart-2-on-grails/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Our scrum project retrospective in practice</title>
		<link>http://www.espeo.pl/2010/09/09/our-scrum-project-retrospective-in-practice</link>
		<comments>http://www.espeo.pl/2010/09/09/our-scrum-project-retrospective-in-practice#comments</comments>
		<pubDate>Thu, 09 Sep 2010 12:24:39 +0000</pubDate>
		<dc:creator>Pawel Rogowicz</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://blog.espeo.pl/?p=332</guid>
		<description><![CDATA[Recently our team finished working on a project so the time has come to make a project retrospective. With a shame I must admit that it was a first time for us, because although we use Scrum for a long time, in previous projects there was never time to do it. I decided that to do it correctly and to get best results we should follow some good and tried practices &#8211;  for some time in our library there was a book &#8220;Agile Retrospectives: Making good teams great&#8221; so that was excellent opportunity to use it. After getting through the book I chose a few activites for different phases of retrospective and it was: Satisfaction Histogram &#8211; for measuring level of satiscfaction about the team, project process and product created Timeline and Color Code Dots &#8211; to gather memories of best and worst moments of projects Patterns and Shift &#8211; to observe some specific patterns in a timeline Five Whys &#8211; getting to reasons of some issues by asking &#8220;Why&#8221; question Brainstorming &#8211; to find solution for problems. So how did it work out? In general the team liked it, it was something new and quite funny, especially Timeline where some very specific moments were recalled. A Satisfaction Histogram proved that guys are really happy about the team and way of working together, but less happy about product they created. They did not like Five Whys activity so much &#8211; somehow it was odd to ask Why questions, to get into essence of problem beucase in most cases  the answer was &#8220;Because there was not enough time&#8221; &#8211; but maybe we didn&#8217;t do it correctly?. We really got some very nice reflections ad things to improve for the future, most important were: educating Product Owner on how to work effectively with a team putting more attention to Sprint 0, by making a list of common things to do organizing more workshops obout design and architecture. Will we use such activities in the future? Definitely, but also need  to work better on timeboxing it because 8 hours was even not enough. Also I really hope that conclusions we made won&#8217;t be fogotten and would be valuable for our future projects and will improve Scrum process. And a book about retrospectives is highly recommended.]]></description>
		<wfw:commentRss>http://www.espeo.pl/2010/09/09/our-scrum-project-retrospective-in-practice/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

