Wednesday, October 1, 2014

Confluence: How to make a page available without signup

I wanted to make a page available to all the employees on confluence without making it publicly available on internet. 

I did not want to add hundreds of account on confluence too. So read little bit and added anonymous user to my space and gave that user a view access. Hoping problem would be solved. After a while realized that I made it available for entire world. 

The started reading more about it and realized that there is a signup option where you can let user access the page without creating the account for them and can also restrict the usage to specific domain only. Look at below screen shot for exact location.


I wanted to write it so don't forget in future :).
Manisha

Thursday, August 7, 2014

Tools not rules

Last two weeks were like a hurricane. I had many discussions with lots of people. It was fun and interesting but I stumbled upon few questions again and again.

Tell us about some of the best practices you followed in your team.

I was not sure how to approach? The practices were only best in that context. Which was best for that team might not be suitable for your team. But people love best practices, isn’t it. I think it requires us to understand that calling something “best” might be misleading. I believe understanding, what we are doing and why we are doing, would be more effective. Suggestions???

Another question was “ How did you folks follow Scrum process in your team?”

Very valid question :D, I explained how we started and what was the end state of our team. Mostly I heard, “You did not follow Scrum”.

For example - You did not have cross-functional team. 
My response was, “In that organization the QA was a shared service”. We could not have them full time as part of our team. We could only have them shared. We tweaked few processes, which was suggested in Scrum to make better use of our time. Isn’t Scrum an empirical process? Unfortunately I could not sale our Scrum to them. To me it’s thoughtfulness and common sense to focus more on WHY we must do certain things rather than just following the rules and rituals. But I may be wrong?

Another example - You did not follow story points?
Yes we did not, in that project, the code-base was new to entire team and we start with our hour/days estimate, since team got that right vs. story points. Slowly we got better and started doing estimation using story point. It seems they did not like us deviating from Scrum. 

It is more important for some folks to follow the process properly. Don’t get me wrong! I want to do that too!!! I don't like Scrum buts too? But I am baffled, what should a tool do? Shouldn’t it enhance our ability to achieve a goal or??? I hammer is a good tool for putting nails but might be a bad idea for putting screws.  Every team and environment is different so our processes have to be different too, isn't it? We should always start with prescribed way if possible and adjust as you go. Again not sure whether it’s my understanding of process or tool is wrong. 

Thoughts or comments 
Manisha



Tuesday, February 25, 2014

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cxf' is defined

"org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cxf' is defined" This error wasted my precious couple of hours yesterday and could not find any blog post pointing to my problem. It seems this problem can occur for various reasons. 

few of them are not including cxf-bundle jar, not having proper cxf.xml files imported into spring context and this error can also occur for the wrong context file. What do I mean by it?

I had below code snippet in my web.xml.
-------------------------------
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>

My root-context.xml did not have any cxf related definition in it though I was loading the correct configuration file in CXFServlet servlet-mapping. I was hoping while loading the CXFServlet it will use the right configuration file and should work. 

But unfortunately after looking at CXFServlet source code realized that if the global config location is not null then only it consider local location. 

I just had to move my CXF related definition to root-context.xml and BOOM my problem was gone. I uploaded the working sample CXF project under my github repo. 


interesting isn't it
Manisha


Thursday, February 20, 2014

How to create a Spring MVC skeleton project in 10 minutes :)

I know it's very simple but have seen people struggling a lot to create and setup the first working project using Spring framework.

Here are the steps to create a Spring MVC skeleton project .

1) Download and Install STS ( Spring Source Tools)
2) Click File -> New -> Project
3) Select Spring Project from the provided list.

4) Spring Project Dialog box would appear. Select Spring MVC Project template and provide the project name.


5) Hit Next and Provide an toplevel package name for your application and choose Finish. 

Believe it or not your Spring MVC application is ready to be deployed on any server. Do look into created projects to understand the pieces involve in it :). 

Happing Spring
Manisha



Saturday, October 26, 2013

Tips for High Performance Web Site

I am enjoying my new book "High Performance WebSite". Few awesome tips for making your website better..

1) Make fewer HTTP request
2) Use a Content Delivery Network
3) Add Expires Header
4) GZip Components
5) Put Stylesheets at the top
6) Put Scripts at the bottom
7) Avoid CSS Expressions
8) Make Javascript and CSS external
9) Minify Javascript
10) Avoid Redirection
11) Make Ajax Cacheable
12) Remove Duplicate Scripts
13) Use Image Spites for CSS
14) Versioning Static Assets

We all know most of the stuff but it's always nice to revise :)

Cheers!
Manisha

Tuesday, October 22, 2013

Updating existing Playframework project from 2.1 to 2.2

It is very trivial but got few minutes wasted for not reading the play migration documentation...

I had my old project in 2.1 and wanted to updated to newer version 2.2.0.

So here I am after downloading latest version of Playframework. Subsequent to downloading, I updated the class path to latest version and changed the version in my plugins.sbt file. Dreaming it will work :(.

First Error
-------------
unresolved dependency: play#sbt-plugin;2.2.0: not found
-------------

Simple enough to understand that some plugin name has been changes. Previous plugin name was play but now it's com.typesafe.play. Hence the new line looks something like below.

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")

After updating this I was confident that I will be able to work on my project now but NOPE... Same old exception. After a while realized that new version of Play comes with new SBT version. So had to update build.properties file to 0.13.0

Update line in build.properties file
-------------------------------------------
sbt.version=0.13.0

This time I was super confident that I will feel the taste of success but same error greeted me with smile. I had to come out of play prompt and did "play clean-all" and then started the play console again. 

BOOM!! Could compile it with new version..

-Manisha



Wednesday, October 9, 2013

Byte Code Enhancement: Eliminates noise for you

In one of our pairing session, I wrote couple of Model classes and public fields. You guessed it right my pair started lecturing me on encapsulation and why it's important to hide the internal representation of an object.  :D 

I am not going into the details of why and what was wrong with exposing the public field. We all know it and pretty much following the javaBean specification all the while for a reason. In gist, we want to save our internal state and don't want anybody to destroy it unintentionally or on purpose.

I assured him that Playframework will takecare of his concerns and will replace the public fields reference with getters and setters right after your original code is compiled by slightly rewriting the byte code.

Playframework helps you eliminate all these boilerplate code where you’d normally write a simple getter and setter, and allows you to just use public fields whenever you DON'T require special logic in a getter and/or setter.

You don’t have to use it, if you don’t want to, you can just create your own getters and setters and Playframework won’t touch your classes.

I would recommend to think little longer if you decide to export or re-use your class outside your application because Playframework does it's magic after class is complied therefore if you ever change your mind to use setters and getters, you have to rewrite your client code. 

Have fun
Manisha