Identity Theft: Biggest Threat To Web 2.0

October 14th, 2008

Having spent most of the time on Internet, social networking is very obvious. While exploring some profiles of friends and some friends of friends I happened to land on some of the celebrity profiles. Though m’ not a big fan of celebrities, but celebrities are celebrities after all, and it urges sometime to know about them if they’re near to you.

image courtesy: identitytheftprotect.usWell, same happened to me, so I got into the celebrity profiles. One profile I’d spent more time on was a very well known local model, so I knew a little about her earlier as well. Profile of her, however, seemed fake to me, and something that came in my mind at first instance was nothing other than “Identity theft”. Discussed it with friends concluded that how come a busiest celebrity can be so active on social network, but it’s mobile world so anything can happen.

Well, this celebrity story was over and out from my mind after a week, but not the Identity theft itself. I kept on finding more about Identity theft and have come up with the fact that “Identity theft is the biggest threat to Web 2.0”.

Identity theft is the biggest threat to Web 2.0 because it’s the biggest and speedily spreading internet crime. According to a research conducted by Gartner, average 28.5 people are becoming victims of identity theft each minute. In 2001, the rate of growth of identity theft was 11% to 20% and it grew upto 80% in 2002 and in 2005 it was 700%. [Source: Identity Theft Resource Center]

The research classifies the identity theft into two types, i.e. true-name identity theft and synthetic identity fraud. The first one is one in which the criminals use credentials of an actual person or business and this stands only 10% to 15% of the total cases while the other one is based on fabricated data and stands 85% to 90% of the internet fraud cases.

Identity theft affects not only individuals but also business and social groups. From Lori Drew’s Myspace case [a 49 years old woman created a false Myspace account in the name of a 16 years old boy, intending to get information from daughter’s friend “MTM” about their relationship. Later the fictitious online relationship got ugly and to end up all this "Josh" broke up with MTM and the girl committed suicide] to online phishing attacks there are hundreds of different situations whereby people suffer. Social Networks are likely to be more vulnerable to identity theft risks, as grabbing user information and creating false accounts on these networks is none too difficult.

It’s a proven fact that technology and innovations have benefited crimes along with the society for betterment and improved lifestyle. But, since there’s always a room for betterment, so is this in the case of Web 2.0. When we talk about communities, user generated content, direct access to the end user and blah blah, one question that’s of equal importance for everyone is “How to maintain your true identity?”

Moderated content and maintaining online reputation systems can resolve this very issue, but almost every social network is after more and more growth in terms of userbase, and there’re some with million of users, i.e Facebook , Orkut, Myspace etc, and it’s nearly impossible for them to keep a check on each and every activity within their online premises. Maintaining privacy and other policies at social network’s end and realizing social responsibility at users’ end does make a difference, but looking at the number of identity theft cases in each minute, the difference seems greater.

Having internet law may be a solution, but which country’s law t will be, or will one country’s law be acceptable in other? International Internet Law may be….! Well that’s a long debate and the speed with which technologies change is not the speed with which laws get updated….!

Finally I found something of my interest and thought that it might help combating the issue. it’s “Web 3.0”. It’ll hopefully be more efficient than Web 2.0, when we’ll have all OpenID and intelligent web [Semantic Web] based applications and websites. With OpenID when user will have same credentials for many websites, he’ll have better control. But the threat of identity theft remains there, when a normal user can do all this, a cyber criminal can also.

So my question is, “we’re on the way to make the web more intelligent, but how can we make the web that intelligent to identify the cyber crimes like identity theft?”

Visual design and story telling..

August 22nd, 2008

This week I had the pleasure to attend An Event Apart design conference. It was a great experience to hear some great presentations and learn new approaches towards design. In next few posts I will try to share all of my experiences.

Starting off the best presentation of the day one was by Jason Santa Maria who is the Creative Director at Happy Cog studios. It was about “Storytelling by Design”. He had raised a very good point that why the design experience on a Wired in-print magazine is so different then Wired’s web experience. The point was that in-print designers try to set the mood around the content but on the web we lose the esence of story telling and just focus on content. Ironically, I think it should be the other way round as we have more tools and independence on the web. The other issue designers face is that we don’t have the control on the medium. Unlike print where the designer can exactly control the layout web designers are at the mercy of browser type, screen resolution and personal settings.

A very interesting book site NoOneBelongsHereMoreThanYou.com was shared as a case study for its out of box approach.I agree with Jason that its wonderfully done and it has a very unique approach. The image on the the left is the homepage and you will see that it doesn’t have any traditional elements like About Us or Info rather it has a compelling text which draws you in. Similarly I also liked Jason’s site, which tries to break away from conventional design and take each post as an individual story that’s why you will see different design around each post.

Great visual design which has a story to tell has been around for many years and its very apparent from the below example of Charles Joseph Minard graphic illustration of Napoleon’s Russian campaign of 1812. If you move from left to right, the design illustrates the size of Napoleon’s army in yellow when he started his march toward Russia and moving from right to left in black you can see the size of his army when he was returning to France. Its amazing to see that how a simple design explains such an dramatic event in history. I think at the end it was just Napoleon and his buddy who reached back.

Jeffry Zeldman also gave an interesting example of how conflict between design and marketing team can result in a funny situation. RealPlayer wants to be a dominat player in media players but on  Real.com it seems that someone was able to convience the the company to psuh a paid version of realplayer down our throat by making free version very hard to find. Apparently someone wants us to download the paid version only. Nice job!!

At the end I will also encourage you to viist a design site named Fray.com which has some great visual stories. In my next post I will share some more great snippits on design and in the meanwhile if you know some other great design sites then please share them in comments.

Mobile Development Overview..

August 21st, 2008

Mobile space is the next paradigm of computing where more and more mobile devices are getting the computational power to now host interactive native applications. Offcourse iPhone has taken a giant leap but now other devices are also catching up. Recently we spent sometime to figure out which development environment will be best suited for new generation of mobile applications. In this report we have not covered FlashLite and iPhone.  As a result we produced a technical discovery document to explore different mobile application development environments and how one can go about it. Below is the report and you can also download the pdf version of report.

This report was created by : Abdul Wadood, Atifa Nadeem, Naima Khan and Haris Khan.

Overview:

Mobile application depends heavily on the exact requirements. Our basic assumptions are stated in the section 3. Based on the basic requirement to create a very generic mobile application following are the three approaches in the order of our preference:

  • Considering the basic and generic requirements Java ME is the ideal development platform. We can adopt different approaches within Java ME to reduce the development effort to make the application ready for all possible platforms and devices. Biggest drawback for this approach will be the application performance and security as this app will run on top of JVM.
  • Second approach is to create a custom Mobile Execution Environment. We will need to develop this environment for each platform with minimum interfaces/APIs as per our requirements. This will result in more effort to create such MEEs for each platform/handset but application development will be rapid. Users will require downloading our own MEE just like they need to download JVMs.
  • Finally the most stable and secure approach will be to create each application in platform’s native language. This will be requiring substantial effort but application’s performance will be at its best.

Development Platforms/Technologies

In this section we have briefly explained how each development platform will be used across different handsets and OS for basic features.

1)- Java ME (formerly, J2ME)

Introduction / Development Approach:

  • Java ME Platform represents the only true open solution for building mobile applications for the industry. The technology allows portability of applications between platforms and investments are kept to a minimum through the possibility of reuse.
  • The Java ME technology is based on three elements:

a- A configuration provides the most basic set of libraries and virtual machine capabilities for a broad range of devices.
b- A profile is a set of APIs that support a narrower range of devices.
c- An optional package is a set of technology-specific APIs.

Deployment Approach:


To be MIDP 2.0-compliant, devices must support OTA provisioning. The easiest way to package MIDlets for wireless installation is to use the J2ME Wireless Toolkit, which incorporates a small provisioning server that emulates a production OTA environment. Available in version 2.0 Beta 2 and later versions of the toolkit, this nice feature enables you to get an idea of whether a server will provision a device with your application successfully without the hassle of setting up and configuring a local web server to act as an OTA server. Some MIDP 2.0 features – like the push registry – are available only to applications downloaded via OTA. If your application uses those features, the built-in OTA server is a critical tool of the development process.

Features:

PUSH

The MIDP includes a feature called “PUSH Registry” to push data from server to mobile devices, without the interaction of user. The MIDlet registers a port along with the protocol name in the mobile device. From the server, a message is sent to the specific mobile device using the particular protocol and port where the MIDlet application is registered to listen. After the message is delivered to the mobile device, the AMS calls the MIDlet application. Once the message is delivered to the MIDlet, it is the application’s responsibility to process the message accordingly.

SMS Integration

  • The Wireless Messaging API (WMA) is an optional package for J2ME that provides platform-independent access to wireless communication resources like Short Message Service (SMS). WMA can be used on top of CLDC and MIDP.
  • There are many third party APIs available for SMS integration in Java ME applications. Some examples are Java SMS library from new-phone.com, SMS JDK from NCL Technologies Ltd, jSMS from objectXP, etc.

Data Synchronization:

  • Recently released, Sun’s Mobile Enterprise Platform (MEP), provides two-way data synchronization with security, device management and off-line access features for enterprises. It can integrate data from a wide range of back end applications.
  • A third party API, Sync4j is an open source initiative to deliver a complete mobile application platform implementing the SyncML protocol. SyncML defines a standard way to synchronize data and remotely manage devices. Sync4j provides SyncML client APIs (J2SE, J2ME and C++) that you can use to build an application.

Devices and Platforms:

Motorola:

  • MOTOMAGX, Motorola’s next-generation Mobile Linux®, supports three different application environment– Java ME, Web UI and native Linux
  • MOTODEV Studio for Java ME, Motorola’s robust toolset for developer innovation currently supports the Java ME application environment on many Motorola handsets and wireless modules

Nokia:

  • Nokia phones have an extensive Java ME API set
  • Nokia provides support for the industry’s leading open-source Java™ IDEs: NetBeans and Eclipse. Both IDEs offer robust tools that make it easy to create high-quality Java applications efficiently

Blackberry:

  • Many new Blackberry devices support the Java 2 Platform, Micro Edition (J2ME), primarily because Java technology makes developing applications so much easier. Its platform-independence eliminates many porting woes and its automatic garbage collection lets developers concentrate on application logic rather than memory management
  • In addition to Java-based handhelds, RIM offers a BlackBerry Development Environment for J2ME

Samsung:

  • Some Samsung handsets give errors for J2ME (user experience). Some users have reported errors like Samsung not suitable for J2ME game developers, slow emulator, Java apps can only be loaded via OTA, giving “Unsupported content error” on Samsung F490 phone

LiMO:

  • LiMO application developers will be able to use SDKs to write managed code running in a Java virtual machine, browser apps for WebKit, and native code.

S60:

  • It supports Java (J2ME MIDP 2.0 commonly, but varies from phone to phone) applications and Symbian C++ applications.

Wireless Providers:

Verizon

  • Verizon Wireless doesn’t offer J2ME support on their phones. Instead, it uses BREW but one can run J2ME applications via BREW-Authored KVM but still it is not that simple

T-Mobile

  • Users are able to download J2ME apps (JAD+JAR) if they have an offline app, like a standalone mobile game but if the app requires an internet connection the users will be able to access internet if and only if:
  • The application was signed with a T-Mobile certificate, or
  • The user has a $20 “total internet” plan instead of the regular $6 T-Zones one, or
  • The handset was not bought through T-Mobile

In short, if you are aiming for a mass-market consumer application and not just one targeted at business users or tech-savvy users, your hands are pretty much tied. The only way to achieve that goal is to go on-deck with T-Mobile

AT&T

  • AT&T appears to be a little less strict than T-Mobile. You can download J2ME applications from anywhere, other applications that want to use socket communication, access to the file system, address book and messaging (SMS/MMS) will probably be blocked

2)- BREW

Introduction/ Development Approach

  • BREW is a software platform that can download and run small programs for playing games, sending messages, sharing photos, etc.
  • Using BREW, you can easily port your applications between all Qualcomm devices.
  • BREW applications can be written using Java™, C, or C++.
  • Unlike the Java ME platform where any developer can upload and execute software on any supported handset, BREW applications must be digitally signed
  • The BREW developer community is fairly small and limited to Qualcomm’s boards and web sites.
  • BREW code can only be compressed if you devise your own method or buy a commercial solution.

Deployment Approach

  • Compile for the specific BREW version available on the handset.
  • Installer Packaging Options: OTA

Features

  • PUSH:

Brew compatible mobile phones can get push based sms/email on the Alltel’s network

  • SMS Integration:

Interfaces like ISMS, ISMSMsg, ISMSNotifier, and ISMSStorage are there to handle SMS integration for BREW applications.

  • Data Synchronization:

Open Mobile Alliance for Data Synchronization and Device Management.

  • Devices and Platforms

The BREW platform is pre-integrated into the MSM™ chip software and includes reference implementations for many other device-specific issues (drivers and UI). All the mobile vendors doesn’t provide with MSM™ chip. So, we have very limited number of mobiles by default for running BREW application.

Wireless Providers

Every mobile vendor is supposed to provide handset with the support of BREW for different wireless providers.

3)- Windows Mobile

Introduction/ Development Approach

  • Windows Mobile is an operating system for mobile devices, based on Microsoft Win32 API.
  • Devices that run Windows Mobile include Pocket PCs, Smartphones, Portable Media Centers, etc.
  • For application development there are different options available, including:
  • Writing native code with Visual C++
  • Writing Managed code that works with the .NET Compact Framework
  • Developing an application using Java Me. There is a limitation if you develop an application in Java ME for Windows Mobile platform. Sun doesn’t officially support windows mobile devices and Sun hasn’t released an official JVM for pocket PC’s so you must go to a third party solution if you intend to use Java ME on Windows Mobile platform.

Deployment Approach

Windows Mobile-based Smartphones and Windows Mobile-based Pocket PCs (Phone Edition) can be bootstrapped by means of over-the-air (OTA) Wireless Application Protocol (WAP) push. This method is useful if the mobile operator prefers to bootstrap the device over the air at the point of sale or after purchase. In this method, a provisioning document that uses the format defined in the WAP Provisioning specifications can be pushed to the device over the air through the WAP connectionless non-secure push mechanism over the Mobile Terminated Short Message Service (SMS) bearer.

Features

  • PUSH

The “Direct Push Technology” from Microsoft uses Exchange ActiveSync to keep data on a Windows Mobile based device synchronized with data on a Microsoft Exchange server. The ActiveSync technology on the device manages the direct push communication with Exchange Server. It establishes an HTTP connection with the server for a specified time, and then goes to sleep while waiting for the server to respond. The server responds with either a status indicating that new items were received or that no new items arrived. The device then sends either a synchronization request or another direct push request. Exchange Server 2003 Service Pack 2 includes a direct push component that augments the Exchange ActiveSync infrastructure that supports synchronization.

  • SMS Integration

.Net Compact Framework provides different DLLs for SMS integrations (Microsoft.WindowsMobile.dll, Microsoft.WindowsMobile.PocketOutlook.dll). Using these DLLs you can integrate SMS Send and Receive functionality as well as SMS filtering support in your mobile application.

  • Data Synchronization

Exchange Server 2003 is used to synchronize data using ActiveSync. It uses OTA for Installer Packaging.

  • Devices and Platforms

Nokia & Sony Ericsson
Net60 is an implementation from Red Filve Labs to bring .Net Compact Framework applications unchanged, to Symbian platform (the OS running the Nokia and Sony Ericsson Smartphones).

Wireless Providers

Most of the carriers have handsets with Windows Mobile.

If you have any queries please feel free to contact me at haris[dot]khan[at]zigron[dot]com

Download the report

Technology + Transparency = Helps you hire better

July 26th, 2008

PingMyCompany.com was started with a pure and simple intention to gather more data about ourself as a firm and know about others too. I have explained it before and Rashid also shared his development story

Now after 3 months since its launch I have witnessed a change which I was hoping to happen but didnt expected to happen so quickly. Before PingMyCompany’s launch people hardly knew about Zigron and what it does. It was very hard for us to get the talent which was a right fit. Yes we had our portfolio out in public but it was hard to attract potential hires as they were never the target individuals for those projects.

Now during interviews when I ask potential candidates what they know about Zigron and the first thing they say is “PingMyCompany”. 

PMC has not only helped us get our name out but most importantly it has helped us attract the right talent. We were getting alot of resumes but most of them didnt really matched our needs but after PMC the quality of resumes have improved dramatically. We are still getting the same number of resumes but now we are getting individuals who really understand what we do and how they can be part of it.

So the take away from all this is that companies need to create more engaging experiences for their future hires through technology and transparency. There has never been a better time to do this as technology to build such experiences and means to reach out has never been so cost effective ever in the history of mankind.

Considering all this we are working on upgrading PingMyCompany.com to create more engaging experience, so stay tuned via PMC blog and twitter feed.

Please feel to share your own ideas on how firms can create such experiences in different fields to attract top and most importantly the right talent.

It Makes A Real Difference When We Work In Teams

July 21st, 2008

We’ve been working in different teams for long, and have known that there are few factors like motivation, communication, flexibility etc that make better performing teams. But, we never knew the extent which we need all these to be. So ZEDCo [Zigron Education Company] organized an event where we could find this extent.

It was basically a game that we played on July 16, 2008 at Zigron office. The game was comprised of 8 analytical and 8 management related questions. In first round everyone had to answer those questions individually [in 20 minutes], and in second round the same questions were answered by groups of randomly selected individuals [in 10 minutes]. On analyzing the both rounds, we found that the team score was higher than that of individual scores for each team. Later the feedback that we collected from participants [letting them rate the importance of flexibility, communication/coordination, decision making, team leading, motivation and entertaining environment] stated that, we think:

  • The most important factors responsible for the success of a team are: Communication/coordination, decision making and motivation.
  • And, the next important are flexibility, team leading and entertaining environment.

Highlights from the activity:

  • Our Co-CEO, Haris Khan accompanied us in the game on conference call, he was also the part of a team, so we’d a live experience of working globally. We also realized that the most important factor for global teams is communication.
  • Teams were randomly grouped, so no one knew that which team he will be in, or who’s gonna be their team members.
  • 100% of the participants believed that teams work better than individuals.
  • Planning and organizing this activity itself was a team effort, and it won’t have happened ever if the team wasn’t there.

Well, this activity helped us a lot identifying what we need to make good teams. Here’re the activity questionnaire and the answers, try the game in your organization, and find what you need more to build effective teams.

Wherever.Tv is launched and brings international tv to you…

July 10th, 2008

Wherever.tv was launched yesterday in SINO Consumer Electronics Show, China. It recieved great reception from both conference attendees and press. It was covered on Forbes.com , Engadget.com , PittsburghLive.com and Examiner.com

Wherever.tv is a sleek new device that delivers hundreds of international TV channels straight to your television instantly over a broadband internet connection. You can learn more at their site.

Wherever.tv is one of Zigron’s Inc startup based in Pittsburgh,PA

 

User Xperience + Technology + Real World

July 1st, 2008

For some time I have noticed that in blogosphere, User Xperience has mostly been associated with Web 2.0 companies and hardware devices, well actually only one hardware i.e iPhone. So I decided to go out and see where I can find innovation in UX apart from the web.

On this great adventure the first experience I stumbled across was Bank Of America’s ATM on Van Ness street in San Francisco. I had this old check, which I was planning to deposit for sometime, but hesitated because my last experience with Chase’s ATM in Chicago to deposit a check was very clumsy. One had to seal the check in an envelope, which the machine will vent out and then write the amount and your account info on top of it. One also has to feed in the check amount. Usually I don’t have a pen with me so it was another embarrassing moment and interestingly most ATM machines have a slanting face which makes it even harder to use it as base to write on it.

Anyway this time around, when I was expecting the ATM to throw an empty envelope out, it just asked me to slide the check in a slot which had a blinking light. For a moment I was taken a back and didnt know what to do but the ATM kept beeping. After gaining some intelligence I decided to slide the check in and said to myself that worst come to worst I will just lose it as it wasn’t that big of an amount. It was from a friend who owed me some grocery money, luckily she wasn’t that hungry while grocery shopping.

Eager to see what will happen, the ATM showed me the scanned copy of my check with the exact amount to two decimal points. It had scanned it on the fly and by using some recognition software had understood my friends handwritten amount to the exact amount. While I was still star struck and excited with the experience, I had my receipt in my hand with a scanned printout of the actual check I just deposited.

Now I call this a true user experience. Next time I will make a video of it. So feel free to send me some checks and please feel free to be liberal with the amount :-)

Why we use symfony Framework

June 28th, 2008

Three years ago I was coding in simple PHP and never heard of any frameworks then after one year I started using frameworks in javascript i.e prototype etc. Soon I realize working in framework makes your life easier, your code is organized, standardized and most importantly your development is fast. It does not matter what framework you want to chose the basic aim of any framework is rapid development. Mostly client is concerned with how quickly you can provide the product, you code simple or use framework is the least concern. An efficient software always has the least code, and framework always tries to facilitate developer to code as little as possible. Currently there are 40 frameworks available for PHP and this shows the success and importance of frameworks.

Our team has worked on various frameworks i.e cakePHP, symfony etc and found out that symfony is little efficient than others. Symfony also has an edge over its documentation plus its community is much better than others.

Some people criticize symfony on the basis that why should they learn a new language i.e yml or propel etc but we think one can learn yml in no time and propel provides you optimized sql queries and database abstraction layer. The database abstraction will provide you the opportunity to shift to any DBMS anytime by just making some configuration changes. This feature will help you when you do not know the DBMS of a client project or the client is not sure about the DBMS, you can choose any DBMS and can shift to any DBMS.

Symfony is so flexible that you can bypass the whole symfony processing and can send the pages direct to server. You can customize it according to your needs to have an optimized solution. Its overhead is so minor that it can be ignored.Its powerful cache feature improves the efficiency of the project. Its debug tool bar or dev mode which will provide you lots of information about the page e.g: sql queries,request, response, page load time etc … and when you want to deploy to the production and get rid of debug statements than just a little configuration change is needed.

In organization where you have multiple developers working on same project, you need to follow a certain standard so that everyone is able to understand others developers code. If you are following a standard than it is very convenient for new employees to adjust and also replacement of leaving employee can be very quick. Therefore we have decided to set symfony as our standard framework.

The Story Behind The Development Of PingMyCompany.com

June 20th, 2008

It was one fine morning, when I came to office and started my work on ZEPRS [an under development project], suddenly phone RANG, I picked. Who is this? I am here, sounded familiar to me, I thought for a moment and realized that my CEO is on other side. Yes Sir, was my second reply.

“I need just 2 pages, one where people can add a company and another page they can post for that company. There will two categories of post, In Favor and Against. And I want to show those posts side by side, something like Zebate ;) and that’s it. No design, No formatting nothing else……………” CEO’s Words

I really wasn’t in mood of working on this “something like Zebate” thing, but it was CEO’s order so …………. that day and it was now, this ping, that ping, that ping, this ping, ping, ping, ping.

PingMyCompany was initially RateMyCompany but A great developer’s mind got PINGED and it was changed to PingMyCompany. Also after first release it was noticed that “PING” is only in our logo and no where else in the site, so it was decided to change all “comments” & “post” to “PING”, just to have PINGY touch across the site.

Well, now it’s PingMyCompany.com, and let me share some of technical aspects of the site. Here it goes:

Firstly, why CEO got this idea to develop such a platform? It was Zigron’s review on Green & White, where there been a long debate on Zigron’s hiring process. It meant, people talk about companies, and when they talk so, they would definitely love to ping for or against a company….. Isn’t it?

Now development: PMC is developed in PHP/MySQL (v5),It was started on 18th April 2008, and first release was online on 24th April 2008. It took 3-4 days exactly to put this this Live for 6 Billion people. Wow….! Well, this was the first release and contained very simple interface and features. Here’s the very first layout:

And after this first release, many revisions came and in each revision new feature pinged in it, making it simpler, user friendly, SEO friendly and lot more features. The summary of all those features is as follows.

Few of web 2.0 features it currently have are RSS feeds, DIV based interfaces, AJAX Postings, Sharing, Clouds, etc. It also has Translation Feature and Twitter integration. A bit of detailed description of these features is as follows.

I have used AJAX & DIV based interfaces so that users can have better User Xperience & quick response time. AJAX has been involved where ever it was feasable like paging, sharing, pinging, adding company etc… I have used Prototype JS toolkit (v1.6) for all ajax related work. I will soon be integrating Scriptaculos toolkit (v1.8) for better and cool AJAX affects.

I took the full advantage of MySql fulltext search features to give a better search results for users. However there has been few limitations as well in fulltext for which I am writing a custom solution to eliminate those limitations.

Through RSS you can get Latest PingMyCompany feeds. Right now we provide full text feeds. Of the multiple RSS formats that exist today (RSS 0.91, RSS 0.92, RSS 2.0), PingMyCompany supports only the 2.0 specification for now. You can get PingMyCompany feed from http://www.pingmycompany.com/rss/feed.rss

It also supports Twitter postings for all those who want to follow all updates on Twitter. You can follow it from http://twitter.com/pingmycompany

A full blown Admin panel has also been written to control everything. This is currently a small scale web application, yet with latest buzzing web features and this is not the end, we’re on the go to add more n more….

“To be very honest, I was not interested working on this application at first but now, after working on this for a month, It looks like that i fell in kind of love with PMC. It really made me learn lot of news things, and polish my existing skills. After working on this project, I really see a significant improvment in my skill set. Thanks to PMC for Pinging My Mind”.

PS: Special thanks to CEO (Haris Khan) for His this nice Idea and a bundle of thanks to Zigron Admin and everyone who were involved directly or indirectly in this project and shared there views, suggestions, appreciation, improvments from time to time to make PMC more consistant and reliable.

Image Selection in JSF

June 18th, 2008

JSF is really nice, but developers sometimes feel suffocated because there aren’t enough components. Recently I ran into a problem of displaying a list of images in grid or you could say in form of rows and columns and being able to select one of them using radio buttons. I searched on the internet but couldn’t find any component that gave the desired functionality. So our team came up with an elegant extensible solution that I feel that I should share with the world since human knowledge belongs to the world.

<!–[if !vml]–><!–[endif]–>

The JSP code to achieve the results of figure looks like:-

1 <div style=“width:620px;height:270px; overflow:auto;”>

2 <a4j:repeat value=#{controller.imageList} var=“imageList”>

 

3 <div style=“width:85px;float:left;”>

4 <h:graphicImage style=“border:2px solid #ccc;” height=“43″ width=“57″ url=#{imageList[0]}></h:graphicImage>

5 <h:selectOneRadio value=#{ imageList[1]} layout=“lineDirection”>

6 <f:selectItem itemLabel=“” itemValue=“selImage”/>

7 <a4j:support event=“onclick” action=#{controller.selectedImageRenderer}“>

8 <f:param name=“selectedImageId” value=#{ imageList[2]} />

</a4j:support>

</h:selectOneRadio>

</div>

</a4j:repeat>

</div>

 

At line 1, The outer divs width is responsible for number of images appearing in a row. The outer divs height is responsible for number images appearing in columns after which the scroll bar shall appear. You are most welcome to play with the div to set number of images in rows/columns.
At line 2, the a4j repeat tag repeats through a list of images which was populated at the controller.
At line 3, we see another div whom we assigned the spacing responsibilities between the images.
At line 4, the graphic image in the list is displayed. The zero index of the list contains the url to the image.
At line 5, radio button is displayed for selecting an image, the value to this radio button is assigned by the first index of the imageList.

At line 6, we define the selection criteria, basically whichever radio button element shall contain “selImage”, it will be selected.
At line 7, when the event click happens on the radio button the method selectedImageRender is called, which we assigned the responsibilities of selecting an image and cleaning up the rest of the radio buttons. imageList[2] contains the currently selected image Id.

The code for the method is fairly simple and is written as follows:-

/***

* @author waqas.rajab

* This method makes the selection of the appropriate image selected on the main page

* This method also clears out the remaining selection of images.

*/

public void selectedImageRenderer(){

String param = getRequest().getParameter(“selectedImageId”);

for(int i=0;i<imageList.size();i++){

Object[] obj = (Object[])imageList.get(i);

if(obj[2].toString().equalsIgnoreCase(param)){

obj[1] = “selImage”;

}else{

obj[1] = “”;

}

}

}

Obj[0] contains Image Url
Obj[1] contains selImage i.e. showing the selected image radio button checked.
Obj[2] contains the ID of the selected image sent as a parameter from the page.