Search
Categories
- Categories
- Cogniance biz news (3)
- Cogniance life (2)
- HR and recruitment (1)
- Marketing & Optimization (6)
- Mobile technologies (4)
- Quality Assurance and testing (5)
- Uncategorized (11)
- Web 2.0 business (4)
- Web 2.0 technologies (11)
Archives
Meta
Archive for the ‘Uncategorized’ Category
Cross-domain ajax requests
Monday, April 19th, 2010Sometimes it is necessary to send Ajax request from a third-party site to our server or from our site to a third-party server. In this case we cannot use classic XHR request due to cross-domain security restrictions. A simple example – a javascript application that will track some user actions on customer website and will send information about these actions to our server. Of course, this javascript application can be included into different sites, and we will have cross-domain requests.
Cross-domain ajax request solutions can be divided in following groups:
Using GET request instead of XHR request
- Insert tag script with src that include GET request to our server. We create element script and set src to our URL with required get parameters. Then we insert a script element into a document head. It resembles an image insertion into html page.
- Using URL fragment from iframe, detailed explanation and implementation in DoJo JS framework. Like in previous solution, but with src attribute of iframe element instead of src from the script element.
Cons:
- low security, because all information will be send in get request and can be intercepted or faked;
- GET query length limit in a browser. For IE this limit is only 2048 B.
Pros: simplicity (use only javascript)
Using proxy
- We can use simple proxy script for site, from which we need to send requests (different languages can be used). The proxy script will then send request from our site to a third-party server (or from a third-party site to our server) – implementation example
In this case we will use server-side language abilities for sending a request. For sending information to proxy script we will use XHR requests. - Apache proxy
Cons: if we need to implement requests from third-party sites to our server, we need to adjust those server sides, which is not always possible.
Pros:
- unlimited request length;
- XHR requests can be used on a client side.
Using Flash
- Cross domain ajax with flash
- f4a library – using this library we only need to include js and swf files with total size of 5 Kb. In these solutions we have to include flash on html page that will interact from javascript with flash, which will send requests.
Cons: need to have Flash installed
Using POST request
Iframe solution – we include iframe with zero sizes and a form with hidden fields, and set target or form to our server side
Cons:
- Internet Exporer security restriction. On such page we get message: “To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer…” and user has to select “Allow Blocked Content…” , otherwise we won’t achieve required result;
- page continues to load in a browser until our POST request is complete.
Each solution has different pros & cons. If we have a small request (less then 2 Kb), we can use script tag injection hack with response in JSONP format. Seldom when we will have big requests (for example, javascript will send content from html element to our server-side), we can use Flash solution, and for browser without Flash (we can detect installed Flash, existing library – flash detection library) and POST for non-Flash browsers.
Written by: Vladimir Shulga
iPhone static framework
Friday, April 16th, 2010Problem with iPhone code sharing
As we all know Apple has not left developers opportunity to create frameworks for iPhone. However, there are a lot of situations when code has to be shared between different projects or even distributed to others developers.
Alternatives
There are a few approaches for the code sharing or distributing.
Firstly, code can be shared/distributed as a source code. Although this approach is quite straightforward and XCode provides a good mechanism for including XCode project to another project, developers have to do some extra steps such as setup dependencies and path for headers. On the one hand it seems quite simple for the experienced developers, on the other it might be a problem for the new developers .
Second approach is to distribute code as a static library. This approach is well known and is used widely in Linux/Unix development thus a lot of developers are familiar with it. However, there are some disadvantages of using it in iPhone development which relate to dynamic nature of Objective-C. The problem is that static libraries are normally used for C/C++ code which has neither properties nor categories and so when, for example, Objective-C category is wrapped in static library a developer has explicitly to set additional linker options:
-ObjC
-all_load
If developer forgets to set the options mentioned above he will get runtime error “unrecognized selector sent to instance”
Static Framework
The most suitable alternative, in my opinion, is a ’static framework’. The idea behind is to force compiler to believe that it uses normal iPhone framework whereas shared libraries are substituted by static libraries. Thus if you have the code you want to share as a static library it is quite easy to transform it into a framework. Afterwords such framework can be added to a project without any extra efforts from the developer’s side.
How to create a Static framework
Since there is no option to build frameworks for iPhone in XCode I recommend using a static framework. To build it into XCode MacOS framework template should be used. Static framework has the same structure as a normal framework. Only a few extra steps have to be done:
link together static library for iPhone Simulator and iPhone Device
add file from the previous step to framework bundle
To make it easy we will write a shell script which does all the work. We will use a lipo utility which is distributed with XCode installation. This utility allows to link a few libraries into one file. Afterwords this file will be copied to the framework bundle and appropriate links will be created.
FRAMEWORK="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework"
lipo \"${BUILD_DIR}/${CONFIGURATION}-iphoneos/libDev.a" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/lib Sim.a" -create -output "${FRAMEWORK}/Versions/Current/${PRODUCT_NAME}"cd "${FRAMEWORK}" && ln -sf "Versions/Current/${PRODUCT_NAME}" ./
This script should be added into a project as a build phase script through the project menu. As a result we get a static framework containing code which now can be easily shared.
Links:
Written by: Dmytro Golub
Russian Wide Web. Introducing cyrillic domain names
Wednesday, December 23rd, 2009From the very start, Internet was entirely English — American English, to be precise. Originating from Arpanet, which prime purpose was to aid the information sharing over the government defense agency, the network standards didn’t seem to care of those who don’t speak English. But things change, and now, according to ICANN, more than half of multimillion Internet audience use non-Latin alphabets in their mother tongues. Despite being negative at first, ICANN has finally responded to a global call for nationalised domain names, and recently announced the program for ‟…delegating a number of internationalized top-level domains”. In layman’s terms, it means that the unipolar Internet world of ICANN holding all the strings in one hand would develop to distributed system, with each country having a body that manages nationalized top-level domains.
Russian officials were among the first who’ve applied. President Dmitry Medvedev is excited about the opportunities to deploy a range of government services over .рф zone, which stands for Russian Federation — but, according to The New York Times, there are other opinions. Technologists express their concerns on new and potentially unstable systems to be introduced; business people don’t see a reasonable ROI in having Russian site names as registrars made sure to make a fortune out of this. Interesting also is the fact that English version of the same page doesn’t list ridiculous prices like ~$350.000 for any domain at the opening day. Alex Gostev of Kaspersky lab notes that it would be a whole new field for fraudsters — and businesses agree: lots of them will be acquiring Cyrillic domains for the only reason of protecting themselves from scam and cybersquatting.
Despite of potential issues, there is a positive side to this novelty. People who are not familiar with English would find native language domain names easier to read and memorize, which will potentially increase the Internet use and penetration. The global network is commonly associated with freedom of speech and thought, ease of access to the most recent information and news etc — so making it easily reachable for the whole new audience is a positive thing indeed. There are concerns expressed in the same NYT article that ‟local internets” would be somewhat hermetic — but they might as well serve as a bridge to global space for those who haven’t had such a possibility in other cases.
Bottom line is, the whole process of introducing non-Latin zones is quite rough around the edges, bringing both problems and opportunities — as any innovation is in its early days. Lots of tech issues to be solved, and lot of political questions as well, which we don’t touch, being a technology company. Let us hear from you instead: what do you think about the future of nationalized domains?
Written by: Yuriy Pryadko
Some lessons from a failed startup
Monday, December 21st, 2009Creating successful startup enterprise is a great experience, but going through a failure may be a huge experience as well – at least this is what Eric Ries states in his talk at Stanford University earlier this year.
Amongst the main lessons Eric claims he has learned during five years of building out product with $40 million investment is “Don’t be crippled by “shadow believes” rule. “Shadow believes” are believes which are universally shared inside the company but never spoked out loud, never documented or discussed, never tested against the real world.
As Erick states, major of these “shadow believes” are:
1. We know what customers want – think whether the vision that you’re following really and truly reflects the reality – the actual needs of your customers
2. We can accurately predict the future – a sheet with numbers frozen in business plan months (or years) before you’ve got first investment round and never changed after that can NOT be relied upon as true prediction of future market and company conditions. Any predictions should be questioned, criticized and reanalyzed all the time as the company develops
3. Advancing the plan is progress – advancing the plan looks like absolutely right thing to do, BUT – is this plan any good? Is it worth while to advance it? Same as knowledge of customer needs and future prediction values, development plans should also be questioned all the time and adjusted to reflect the current reality
Written by: Sergii Gorpynich
Building iPhone and Android apps with HTML/CSS/JS
Wednesday, December 2nd, 2009Just a few days ago we had a chance to look at Appcelerator platform and its Titanium family of products.
We looked primarily at Titanium Mobile, as both Android and iPhone are of a significant interest for us – we do lots of development for these platforms.
So we’ve played quite a bit with Titanium Mobile and here’s quick summary of our opinions:
Pros:
• Same code that works on iPhone and Android platforms. As Android market gets traction, the option to “kill two birds” with one code-base looks like really cool.
• Enough to know html/CSS/js to develop. This is important. Especially for iPhone. While we regard Android Java SDK as a very good development platform and our J2EE engineers just love coding for Android (although they quite shun from J2ME) iPhone Objective C is pretty different story. It is difficult to learn, it is bug-prone. It has quite weird callback logic. In fact, it is literally impossible to train Java or Ruby or Python engineer into iPhone engineer. Titanium Mobile opens iPhone apps world to even more light-weight technologies, and this is just great.
• Easy to install and to use.
• Free and open source.
Cons:
• Optimality of generated native code and native SDK coverage is questionable. Our experience shows that all such translator solutions (and another example is Adobe’s Action Script – 2 Objective C builder) do not cover complete set of native SDK functions. Honestly speaking we did not run into such situation with Titanium Mobile, but our gut feel is that there should be some limitations.
• Ability to quikly support new SDK releases. Apple’n'Google naturally are enhancing their SDKs all the time. Ability of appcelerator to quickly follow these changes is questionable.
That said, here’s our current view on how Cogniance may use Titanium Mobile: it is definitely useful when quick’n'dirty prototyping should be done or when app functionality is pretty straightforward and simple. But, if the task is to create state-of-the-art app which utilizes many advanced SDK features we will probably not risk to go with Titanium Mobile and go straight to native layer. Yet, we appreciate that Cogniance is not exactly target consumer for Titanium Mobile, as we’ve already got both iPhone and Android engineers and Mobile targets web developers w/o native layers knowledge.
Written by: Sergii Gorpynich
Kanban vs. Scrum. Which is better software development approach?
Friday, October 23rd, 2009I’ve first met with very strong concept of Kanban during my study at business school and was really impressed by broadness of business applications of this “invention of the Samurais”. It turns out though, that there’s also a lot of buzz on Kanban right now in the agile software development community. Especially there’s lots of Kanban vs. Scrum comparisons. Since Scrum has become quite mainstream now, a common question is “so what is Kanban, and how does it compare to Scrum?” Where do they complement each other? Are there any potential conflicts?
These are questions which Henrik Kniberg discusses on his blog. Here’s his paper on this topic, which is interesting as well.
I’ve met virtually with Henrik first time when I’ve red his book “Scrum and XP from the Trenches” , which I’ve found really interesting and may recommend to anyone who is interested in software development methodologies.
Author: Sergii Gorpynich
How to choose the right CMS
Monday, September 21st, 2009I’ve just come over a good small article by Adam Torren dedicated to choosing a right CMS for your web site. We at Cogniance often integrate CMS into solutions we build for our clients, and we think that advices by Adam make sense. Here’s specific products he suggests:
Joomla is a highly flexible CMS that allows you to create numerous modules and components within a fresh and progressive framework. The latest version, 1.5, marks a considerable improvement. Note, though, that while you may be able to install this CMS in less than 30 minutes, it takes a while to get the hang of.
Mambo, much like Joomla, is quite powerful and is simple to use. Its control panel is more user-friendly, though, and the system is backed up by a growing community of forum support.
Drupal is considered one of the top open-source CMS systems available, especially as far as its architecture is concerned. This system is best suited for developers though, so non-techies should tread carefully. Some users find Drupal more functional than Joomla or even WordPress, but if you’re inexperienced, you may be better off sticking to the others.
Wordpress has long been known as the blogger’s platform and it’s at the top of its game. It is very simple to use, but and may not be the best platform if you require considerable e-commerce functionality.
Written by: Sergii Gorpynich
Music 2.0. Cogniance’s got talent!
Friday, September 4th, 2009Cogniance, apart from its daily web 2.0 activities and simply being a fun place to work, has another, much more exciting side – actually, its people, who are good not only at writing clean codes, but indulging themselves into more sophisticated spheres like poetry and music.
Our Front-End Architect Vladimir Agafonkin is a shy person and doesn’t talk much of his musical talents. Rare mentioning about long hours of rehearsals and photos in photoblog “in the process” made a release of the debut album of his band Obiymy Doshchu even a more unexpected event.
The “Elehia”, essence of melancholy and autumnally lyrical rock, finally was announced in official studio release on August 29, 2009. It is now available for download from the band’s official website.
From the very beginning and until the last note the “Elehia” is an intimate story of feelings arising in the sounds of the autumn rain and dissolving in a bitterly cold loneliness… and worth lingering to find a hope for revival.
Album presentation in Kyiv is planned for the end of September and will be announced later on in the band’s news.
There are two more musicians at Cogniance that we expect go public soon. They are Max Stukalenko, System Administrator at Cogniance plays bas guitar in “Avariyne Nebo”, and Tim Baga, Senior Software Engineer is a front-man of “Untitled” hard-rock band.
Web 2.0 technologies – which one to choose?
Tuesday, April 28th, 2009Web technology market is quite mature – there are both new technologies that have recently proven themselves successful and mature technologies which have been available for 5+ years and are still actively evolving. Which one to choose for a new web venture? We have some suggestions and share them out at our new white paper. Everyone is welcome to read and share comments at this blog post.
Reach us and follow!
Thursday, February 26th, 2009We’re glad to share our expertise & vision with you.
Follow us on Twitter to stay tuned for the latest industry updates. Join Cogniance groups at Facebook and Linkedin to connect with world top 5% Engineers community.
Cogniance