This is a mirror of official site: http://jasper-net.blogspot.com/

Исходные коды кросс-платформенного фреймворка Enyo 1.0 и 2.0

| Thursday, January 26, 2012
Компания HP начала выполнять обещанное и выкладывать в open source части webOS. Сегодня ночью состоялся первый подарок — JavaScript-фреймворк Enyo под лицензией Apache 2.0. Теперь это кросс-платформенный фреймворк.

Enyo отлично подходит для создания легковесных и быстрых приложений: ядро Enyo весит всего 13 КБ. На сайте Enyo есть Playground, где можно написать любой код и посмотреть, как он работает.

Скачать Enyo 2.0
Смотреть код на github

Read more: Habrahabr.ru
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://habrahabr.ru/blogs/mobiledev/137023/

Posted via email from Jasper-net

HTML5 - Table of Content

|
כתבתי די הרבה על נושאים שונים של HTML5, וחשבתי לרכז את כולם.
 
בשונה ממדריכים אחרים שכתבתי, הפוסט הזה אינו מרוכז לפי סדר מסויים, אלא מגוון רחב של פיצ'רים שהסביבה נותנת.
 
אני מחלק את זה לשינויים ב - HTML, תוספות של CSS ופונקציונליות חדשה ב - JS - כמובן שישנם חידושים שחופפים ואפשר היה להצמיד אותם גם ל - CSS וגם ל - JS, אך מיקמתי אותם היכן שנראה לי יותר מתאים.
 
חשוב לשים לב שבחלק מהפוסטים יש כותרת של What new in IE8 וכדומה, אל דאגה - כאן שמתי אך ורק פוסטים של HTML5, כלומר שינויים של IE שמוגדרים מהתקן.
 
 
HTML

HTML5 - HTML Review - הסיבות למה כדאי לעבור ומה זה בכלל HTML5.
New Elements - הכרת האלמנטים החדשים.
Canvas - הכרת האלמנט שמאפשר לצייר על גבי המסך.
Generic elements - אלמנטים חדשים שהמפתחים ממציאים.
Audio - הכרת האלמנט המאפשר לנגן.
Video - הכרת האלמנט המאפשר להציג וידיאו


Read more: שלמה גולדברג (הרב דוטנט)
QR: html5-table-of-content.aspx

Posted via email from Jasper-net

15 Fresh And Free Download GUI Kits for Android Developers

|
android-gui-15.jpg

According to wikipedia Android is a Linux-based operating system for mobile devices such as smartphones and tablet computers , developers are increasingly interested in this platform that’s why today’s post you will find a fresh collection of Android GUI kit for developers , Chech Out them. !

Read more: Best Free Web resources
QR: 15-fresh-and-free-download-gui-kits-for-android-developers.html

Posted via email from Jasper-net

Free Microsoft Security tools and utilities

|
We provide a significant range of security tools for use by organizations and at home at a great price - FREE!

The following list is from our complementary monthly 'Security Chronicles' publication available to enterprise customers.

    Microsoft Security Compliance Manager 2 (SCM 2) ...
    Microsoft Baseline Security Analyzer 2.2 (MBSA 2.2)...
    The Microsoft Security Assessment Tool 4.0 (MSAT 4.0) ...
    Microsoft Safety Scanner ...
    The Microsoft Malicious Software Removal Tool (MSRT) ...
    Microsoft Security Essentials (MSE)...
    Windows Defender ...
        The new Windows Defender Offline Beta can also help to remove hard to find malicious programs using definitions that recognize threats.


Read more: Greg's Cool [Insert Clever Name] of the Day
Read more: Free Microsoft Security Tools You Should Know About . . .
QR: free-microsoft-security-tools-you-should-know-about.aspx

Posted via email from Jasper-net

4 Ways to Create Bootable Live USB Drives (For Windows, Linux and Mac OS X)

|
1. Using UNetbootin (for Windows and Linux)

photobucketUNetbootin allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD. You can either let it download one of the many distributions supported out-of-the-box for you, or supply your own Linux .iso file if you've already downloaded one or your preferred distribution isn't on the list.

UNetbootin has built-in support for automatically downloading and loading the following distributions: Ubuntu, Debian, Fedora, PCLinuxOS, Linux Mint, Sabayon Linux, Gentoo, MEPIS, openSUSE, Zenwalk, Slax, Dreamlinux, Arch Linux, Elive, CentOS, Damn Small Linux, Mandriva, SliTaz, FaunOS, Puppy Linux, FreeBSD, gNewSense, Frugalware Linux, NetBSD but can work with others too.

Read more: Web Upd8
QR: 4-ways-to-create-bootable-live-usb.html

Posted via email from Jasper-net

YouTube's $500,000 hunt for world's best storyteller

| Wednesday, January 25, 2012
Screen_shot_2012-01-19_at_4.02.04_PM_610x337.png

YouTube announced its Your Film Festival project today. One winner will get $500,000 and the chance to turn their story into a worldwide phenomenon.
(Credit: Screenshot by CNET)

If you're a storyteller, wouldn't you want the chance to have "Gladiator" and "Blade Runner" auteur Ridley Scott help you with a project? And wouldn't it be great to have half a million dollars to spend on it?

That could be your future if you're the winner of YouTube's Your Film Festival, a competition to unearth the world's best storyteller that Google's video sharing site announced today.

Read more: CNet
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://news.cnet.com/8301-13772_3-57362410-52/youtubes-$500000-hunt-for-worlds-best-storyteller/

Posted via email from Jasper-net

Hackers zap Zappos: Info from 24 million users stolen

|
Popular online shoe retailer Zappos.com said late Sunday that hackers had accessed its network, stealing customer account information from as many as 24 million customers.

Credit card information was not stolen, company CEO Tony Hsieh said in a statement sent to users, but email addresses, billing and shipping addresses, phone numbers, the last four digits from credit cards -- and more -- may have been compromised.

"We were recently the victim of a cyberattack by a criminal who gained access to parts of our internal network and systems through one of our servers in Kentucky," reads a statement posted on the company's blog. "We are cooperating with law enforcement to undergo an exhaustive investigation."

The company stressed that credit cards were not affected, and that it has already reset the passwords for existing customers to prevent abuse of the stolen data.

But users could still be at risk, security experts warn.

"This event offers a teachable moment for almost anyone does online transactions," said Ira Victor, a computer forensics and information analyst with Data Clone Labs.

"Many online shoppers use the same password for multiple sites. This means the Amazon or Facebook password maybe the same as the banking password, and the password for workplace email."

"Cybercriminals know that password reuse is very common," Victor said.

Read more: FoxNews
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.foxnews.com/scitech/2012/01/16/zappos-zapped-hackers-steal-info-from-24-million-users/

Posted via email from Jasper-net

CERT Team Improves Security in the New ISO/IEC C Programming Language Standard

|
January 9, 2012—In the field of information technology, ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) has established a joint technical committee ISO/IEC JTC 1. For the past several years, members of the Secure Coding team in the SEI’s CERT Program have been contributing to the development of a major revision of the ISO/IEC standard for the C programming language. CERT’s efforts have focused on introducing much-needed security enhancements to the language and standard library. These security enhancements include (conditional) support for bounds-checking interfaces (originally specified in ISO/IEC TR 24731−1:2007), (conditional) support for analyzability, static assertions, no-return functions, support for opening files for exclusive access, and the removal of the insecure gets function. In December 2011, the work of the CERT team and industry participants resulted in the release of ISO/IEC 9899:2011, informally referred to as C11. This third edition of the C standard cancels and replaces the second edition, ISO/IEC 9899:1999.

David Keaton, a member of the SEI’s Secure Coding team, served as chair of Task Group PL22.11 C of the International Committee for Information Technology Standards (INCITS). Working with SEI colleagues Robert C. Seacord and David Svoboda, Keaton helped develop, refine, and introduce many of the security enhancements to this major ISO standard revision.

“Security features in C had been limited to the snprintf function, introduced in 1999,” explained Keaton. “Now, the new ISO standard includes an entire new library of secure string functions, plus an optional compilation model that makes C code more understandable by source code analyzers that perform security checks.”

Read more: Software Engineering Institute
QR: iso-standard.cfm

Posted via email from Jasper-net

Warcraft Soccer

|
Project Description
Warcraft Soccer is a soccer game built on Warcraft III engine. Similar to real life, the game lets you pass, shoot, jump and even dribble. If you are a Warcraft III player and looking for a fun map to play, give it a try!

Read more: Codeplex
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://war3soccer.codeplex.com/

Posted via email from Jasper-net

JMono

|
Experimental Project: JMono is a java implemented Mono runtime to attempt to run .NET compiled applications through the Java Virtual Machine without needing to have a separate Mono VM, and possibly some extra assistance with low level C libraries. The main goal is to get Mono programs running on Android through the main Java Dalvik machine.

Design Goals

    Fully implement Mono/.NET 4.0
    Full performance
    Support of Android API
    Support WCF, WPF, WF
    MSIL Interpreter / JIT recompiler


Read more: Codeplex
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://jmono.codeplex.com/

Posted via email from Jasper-net

Я медленно удаляю apache с сервера

|
Есть у меня серверок (да, да, именно серверок, сервером его назвать сложно). Железо старенькое (2 гига оперативы, AMD Athlon(tm) 64 Processor 3500+, програмный RAID). Админю я его сам, без особых навыков и познаний. Когда-то давным давно (больше года назад) поставил на него Debian 5.0 Lenny (это была вторая в жизни установка linux-системы, до этого ставил только Ubuntu на рабочий ноутбук) и панель управления ISPConfig3 по мануалу. Держу на нем несколько (штук 40) сайтов друзей и клиентов, Redmine, SVN и еще немного по мелочам.
Периодически все это безобразие падает (load average > 20), и приходится на сервере раз в пару часов перегружать apache или высасывать из пальца очередную попытку оптимизации. В общем полный раздрай и разруха. И вот в одну прекрасную субботу я подумал — а почему бы не решить вопрос раз и… И вот в общем.

Под катом — история убитых выходных + предыстория. Интересна в первую очередь мне, чтобы потом легко вспомнить что именно и зачем я ставил. Может быть интересна новичкам в интересном и нелегком (ох, ...) деле серверной оптимизации постепенным(!) переводом сайтов из-под Apache c его ModRewrite под Nginx (кстати, правильно это слово читается «энжинкс»меня поправили, Сысоев на конференциях не раз говорил, что название сервера стоит читать, как «энжин-икс», спасибо bayandin и DorBer ). Возможно, будет интересна более-менее опытным товарищам, оказавшимся в тех же условиях (Debian Lenny, ISPConfig3, слабое железо, несколько хороших, не сильно хороших и разных сайтов). И более опытным может быть интересно зайти, оставить пару комментариев.


Краткое содержание этой серии:
Вместо предисловия — Новичок и его сервер
1. Слушаем чужие советы и тратим время на чепуху
2. Реверс-прокси и еще один админ (ставим и коряво настраиваем nginx)
3. Наконец-то взялись за ум (nginx + php-fpm + eAccelerator)

Начнем с истории

Сервер ставился по вот этому мануалу — классический LAMP + Хостинг-панель + phpMyAdmin.
Позже на него поставили Redmine, который пользовали по прямому назначению и SVN. И тот, и другой в качестве web-сервера используют Apache. Один через Passenger, второй через mod_dav_svn. Это важно, потому что Apache после этих установок потяжелел.

Read more: Habrahabr.ru
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=habrahabr.ru/blogs/server_side_optimization/136740/

Posted via email from Jasper-net

הכירות עם AppHarbor: פלטפורמה כשירות (PaaS) לאפליקציות NET. ו- Node.JS

|
image_77B9AE6B.png

AppHarbor היא פלטפורמה כשירות (Platform-as-a-Service) עבור אפליקציות NET. ו- Node.JS. למעשה מדובר בפלטפורמת ענן מבוססת Windows שיכולה להריץ אפליקציות ושירותים הכתובים ב- NET. ו- Node.JS ולגדול איתם (to scale) לאורך זמן. פשוט “דוחפים” קוד ל- AppHarbor ע”י שימוש ב- Git, הקוד נבנה, מורצים Unit Tests והפרוייקט מוכן לרוץ.

כמו כל פלטפורמת ענן, היא מאפשרת למפתחים להשקיע יותר זמן בפיתוח האפליקציות שלהם מאשר בענייני IT. היתרון בה לעומת פלטפורמות ענן אחרות הוא שלא נדרש לכתוב קוד ספציפי כדי לקחת אפליקציית ASP.NET ולהעלות אותה לענן עם AppHarbor וניתן להעלות אפליקציות כמעט ללא שינויים כלל.
רישום ל- AppHarbor

ניכנס לעמוד הראשי של AppHarbor בכתובת: http://appharbor.com:

Read more: Guy Burstein's Blog
Read more: AppHarbor
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://appharbor.com/

Posted via email from Jasper-net

Linux application/script debugging with ‘strace’

|
Every now and then, you'll encounter a problem with an application or a script that is not clear straight away. After the normal troubleshooting, it can be helpful to see the actual system calls that occur when that script executes. Using a tool like strace (manpage) can help you in identifying what is causing the system to slow down or misbehave.

In this blogpost I'll show you some examples where strace can be useful for you. Most of it will be with PHP code but they're easy enough anyone can understand them.
Installing strace

Strace isn't installed by default on most distributions. To install, do a simple yum install strace when on CentOS/Red Hat or apt-get install strace on Debian/Ubuntu systems.
Getting output from strace

You can use strace in two different ways. You can attach it to an already running process or you can use it to start a custom application or script and follow all system calls from the very beginning.

In short, here's how it goes. If you want to start your application and troubleshoot it from beginning to end, you do this:

    ~# strace -f $command
    ~# strace -f php -q somefile.php

Or you want to attach to a running process, use this:

    ~# strace -f -p $pid
    ~# strace -f -p 8151

The -f parameter tells strace to follow any children or processes that are spawned/forked from the application.
Standard usage of strace

By default, strace will show you -all- system calls that your application or script is performing. That can get pretty overwhelming, but it's a good place to start. Take for instance the following simple script called 'test1.php'.

<?php
   /* Simple buggy script */
   for ($i = 0; $i < 5; $i++)
      sleep(1);
?>


Read more: # Defining Chaos In Order
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://mattiasgeniar.be/2012/01/21/linux-application-script-debugging-with-strace/

Posted via email from Jasper-net

How to write unit tests for JSON, XML and SOAP endpoints of WCF Service

|
Background

In a recent project I worked on WCF service with the following requirements:

    Support requests and responses in SOAP, JSON and XML.
    Support GET and POST requests.
    Be able to Unit Test SOAP, JSON and XML requests

CLICK HERE TO DOWNLOAD SOURCE CODE FOR WCF SERVICE and UNIT TESTS
The WCF Service
For a sample application I made a Math service that allows for Adding two values together.
public class MathService
{
    public int Add(int value1, int value2)
    {
        int sum = value1 + value2;
        return sum;
    }
}

To access this service through WCF, I added the following IService contract:
[ServiceContract(Namespace = "apidoc.sampleapi.com", Name = "SampleApi")]
public interface IService
{
    [WebGet( UriTemplate = "Add?value1={value1}&amp;value2={value2}&amp;apiKey={apiKey}", BodyStyle = WebMessageBodyStyle.Bare)]
            AddRs AddWithHttpGet(int value1, int value2, string apiKey);
 
    [WebInvoke(Method = "POST", UriTemplate = "Add", BodyStyle = WebMessageBodyStyle.Bare)]
    AddRs Add(AddRq rq);
}


Read more: Entech solutions
QR: wcf-web-service-for-soap-json-and-xml-with-unit-tests

Posted via email from Jasper-net

Split Generic.xaml in Silverlight Applications

|
If you work with Templated controls in a big Silverlight project, your Generic.xaml might grow fast. Here’s a quick tutorial on how to split the Generic.xaml into multiple resource files.

Step1: Find the resource

You will typically have the control code:

public class TemplatedControl1 : Control {
    public TemplatedControl1() {
        this.DefaultStyleKey = typeof(TemplatedControl1);
    }
}

and the XAML in the Generic.xaml:

<Style TargetType="local:TemplatedControl1">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="local:TemplatedControl1">
                <Border Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Step2: Create a new resource file

Create a copy of Generic.xaml and rename to TemplatedControl1.xaml.
Delete the TemplatedControl1 style from Generic.xaml.
So Generic.xaml looks like:

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:SilverlightApplication1">
</ResourceDictionary>


Read more: LOEKVANDENOUWELAND
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://loekvandenouweland.com/index.php/2012/01/split-generic-xaml-in-silverlight-applications/

Posted via email from Jasper-net

Cosmos Release 87612

|
Download?ProjectName=cosmos&DownloadId=68007&Build=18365

Release Notes

Express users need to install the Visual Studio 2010 Integrated Shell runtime. This means C# Express and VB.NET Express users can install this release!

Features included in this release:

    Debugger: Allows to step through your kernel code, view locals, CPU registers, the associated assembler, etc.
    Ongoing code updates, including compiler fixes, kernel work, etc.

Read more: Codeproject
QR: 80947

Posted via email from Jasper-net

How to Mock a WCF Service

|
Introduction

Unit tests have become integral part of any build now days. Unit tests should be written normally for smallest units of code i.e. methods doing some specific and independent work. But, what if your method is calling different layers (like Method => BusinessLogicLayer =>DataLayer) to get its work done and you want to write unit tests for that? If your unit test also calls all these layers in actual it doesn’t go with the actual purpose of unit tests. Unit test should definitely not call other layers for sure. Situation becomes a bit tricky and difficult when you want to write a unit test for a method which calls a WCF service internally.

To overcome from this problem we use Mock Frameworks. There are many Mock frameworks available in the market but I will be discussing mocking using MOQ here. Let us take wcf scenario and try to mock a wcf method using MOQ mock framework while writing a unit test for wcf client method (which calls wcf service).

I will highlight some other features also later in this article.

Using the Code

My wcf service WCFService is derived from an interface IWCFService and has a method GetData(int value)

namespace WCFService
{

    public class WCFService : IWCFService

    {
        public string GetData(int value)

        {
            return string.Format("You entered: {0}", value);

        }

    }
}

A wcf client WCFClient consumes WCFService using a service agent WCFServiceAgent. Service agent implements a method HitWCFService() which calls service method GetData()


namespace WCFClient
{
    public class WCFServiceAgent

    {
        IWCFService wcfService;

        public WCFServiceAgent()
        {

            this.wcfService = new WCFServiceClient();
        }

        // constructor for unit test
        public WCFServiceAgent(bool isUnitTest)

        {
            this.wcfService = UnityHelper.IoC.Resolve<IWCFService>();

        }

Read more: Codeproject
QR: How-to-Mock-a-WCF-Service

Posted via email from Jasper-net

Building C# custom controls in WinRT Metro

|
image.axd?picture=2012%2f1%2fwpf_customcontrol.png

This article describes how to build custom WinRT Metro controls in C# and XAML, with the Developer Preview version of Visual Studio 11. WPF, Silverlight, and WinRT Metro have two ways to roll your own controls: custom controls, and user controls. User controls are composite controls that are created by dragging and dropping other controls onto a XAML surface. They are nothing more than content controls that are optimized for design-time use. User controls are typically for sharing within an application, but not with other applications. Custom controls on the other hand, are created by defining a class that derives -directly or indirectly- from Control, together with a definition of a default style. Custom controls are typically hosted in control libraries, and shared between multiple applications. Custom controls are much more flexible in terms of reuse, styling, templating, and theming.

For this article I created a simplified version of the Slider control. It's called SimpleSlider. It has a Minimum, Maximum, and Value property. Visually it only consists of a moving part -the thumb- and a colored rectangle of which the width is bound to the Value property:


Read more: Diederik Krols
QR: Building-C-custom-controls-in-WinRT-Metro.aspx

Posted via email from Jasper-net

How to use Pex and Moles to generate unit tests for a project having external dependency(WCF Proxy) using Visual Studio 2010 SP1

|
In this post I’ll discuss about writing unit tests using Pex and Moles. Pex and Moles are Visual Studio 2010 Power Tools that help Unit Testing .NET applications.

    Pex automatically generates test suites with high code coverage. Right from the Visual Studio code editor, Pex finds interesting input-output values of your methods, which you can save as a small test suite with high code coverage.
    Moles allows to replace any .NET method with a delegate. Moles supports unit testing by providing isolation by way of detours and stubs i.e. Generate a Mole type from the original type and redefine its behavior using delegates.

Pex and Moles can be downloaded from http://research.microsoft.com/en-us/projects/pex/.

I’ll explain the steps to generate unit tests for a project which calls a WCF service. Pex will be used to generate unit tests. Moles will be generated to isolate the external dependency(WCF proxy) and behavior will be redefined using delegates.

The projects inside the sample solution are

    DemoService: This project is a WCF Service.
    DemoLibrary: This project is a Class library and service reference to DemoService has been added. Unit tests will be generated for this project.
    ConsoleApp: This project is a Console application.
    DemoLibrary.Tests: This is a Test project and contains unit tests for DemoLibrary.

The solution structure is displayed below

image_thumb5.png?imgmax=800

Read more: Codeproject
QR: How-to-use-Pex-and-Moles-to-generate-unit-tests-fo

Posted via email from Jasper-net

Разработчики Ubuntu представили инновационную альтернативу традиционным меню

|
Pangolin_matrix_v1-3e.png

Марк Шаттлворт представил новую систему меню 'Head-Up Display' (HUD), которая проповедует кардинально иные методы и может заменить обычную систему вложенных меню, которая существует в компьютерной индустрии уже более 30 лет. Теперь вместо путешествия через многочисленные выпадающие меню для поиска нужного приложения или команды, система HUD предложит пользователям просто напечатать в поисковой строке, что они хотят сделать. В процессе набора команд система будет автоматически подбирать и предлагать наиболее вероятные названия программ из приложений имеющихся в системе или команд, имеющихся в штатном меню текущего приложения.

Read more: Habrahabr.ru
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=habrahabr.ru/blogs/ubuntu/136939/

Posted via email from Jasper-net

App Inventor source code

|
Google and MIT are pleased to announce the initial free and open-source release from Google of the App Inventor source code

There's currently little supporting documentation yet, and we’re not accepting contributions to the code right now. That will happen later, after the MIT Center of Mobile Learning opens their App Inventor server to the public. We hope to nurture a robust and active open-source project eventually, but for now we don't want to distract the MIT developers from their efforts to complete and deploy the large-scale public server. In the meantime, we’ll update the code periodically to match what’s running at the latest MIT experimental system. We've also created a Google Group here for people working with the code to relate their experiences with the code, ask questions, help each other, etc.

People who create modifications from this code base are free to use the term “App Inventor” and the puzzle-piece Android logo in their work. MIT will be releasing its own versions under the name “MIT App Inventor”, which is reserved for the systems actually coming from MIT.

Please note that at the current time, the App Inventor build server (part of this code release) only works on Linux and Mac operating systems.

See SourceMap for a high level description of the various source directories.

See BuildingAndRunning to get started building and running App Inventor from this code.

Enjoy the code, and Happy Inventing!

Read more: Google code
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://code.google.com/p/app-inventor-releases/

Posted via email from Jasper-net

Let's make TCP faster

|
Transmission Control Protocol (TCP), the workhorse of the Internet, is designed to deliver all the Web’s content and operate over a huge range of network types. To deliver content effectively, Web browsers typically open several dozen parallel TCP connections ahead of making actual requests. This strategy overcomes inherent TCP limitations but results in high latency in many situations and is not scalable.

Our research shows that the key to reducing latency is saving round trips. We’re experimenting with several improvements to TCP. Here’s a summary of some of our recommendations to make TCP faster:

1. Increase TCP initial congestion window to 10 (IW10). The amount of data sent at the beginning of a TCP connection is currently 3 packets, implying 3 round trips (RTT) to deliver a tiny 15KB-sized content. Our experiments indicate that IW10 reduces the network latency of Web transfers by over 10%.

2. Reduce the initial timeout from 3 seconds to 1 second. An RTT of 3 seconds was appropriate a couple of decades ago, but today’s Internet requires a much smaller timeout. Our rationale for this change is well documented here.

3. Use TCP Fast Open (TFO). For 33% of all HTTP requests, the browser needs to first spend one RTT to establish a TCP connection with the remote peer. Most HTTP responses fit in the initial TCP congestion window of 10 packets, doubling response time. TFO removes this overhead by including the HTTP request in the initial TCP SYN packet. We’ve demonstrated TFO reducing Page Load time by 10% on average, and over 40% in many situations. Our research paper and internet-draft address concerns such as dropped packets and DOS attacks when using TFO.

Read more: Google code blog
QR: lets-make-tcp-faster.html

Posted via email from Jasper-net

פורום XAML, WPF וסילברלייט ראשון בעברית נפתח - הגיע הזמן!

|
בשעה טובה ומוצלחת נפתח בהנהלתי פורום חדש ב MSDN ישראל עבור WPF, סילברלייט ו XAML (השם של איחוד הטכנולוגיות החל מחלונות 8).

הפורום יתנהל בעברית, וזהו הפורום הראשון בעברית לטכנולוגיות הללו. בין אם אתם מתחילים צעדים ראשונים ובין אם אתם מפתחים מנוסים, תמצאו שם לא מעט. מבעיות פשוטות עד לארכיטקטורה מורכבת של אפליקציות גדולות, אני אשמח לעזור בכל שאלה, כשעקרונית אנסה להיות שם זמין לפחות פעם ביום.
שתי הטכנולוגיות WPF וסילברלייט מתאחדות בחלונות 8 לטכנולוגיה אחת, בשם XAML, והפורום יהיה מוקדש לא מעט לפיתוח בטכנולוגיה החדשה (הרבה נשאר אותו דבר, אבל לא מעט השתנה).

כל מי שקורא את הבלוג שלי בצורה קבועה יודע שאני מפתח הרבה מאוד גם בHTML5, אבל למרות שHTML5 לוקח הרבה מאוד מתשומת הלב של מפתחי הקליינט, XAML הינה ועודנה הטכנולוגיה הכי פרודוקטיבית לפיתוח לחלונות 8, וזה לא הולך להשתנות מתישהו בזמן הקרוב. בין אם אתם מפתחים בטכנולוגיות הללו כבר עכשיו לחלונות 7 ובין אם אתם מתכננים ללמוד את הטכנולוגיות הללו עבור חלונות 8 – הפורום יהיה נקודת התחלה מאוד טובה. (ובתקוה גם יותר מנקודת התחלה).


Read more: אלעד כץ | Elad Katz
Read more: MSDN Forum
QR: threads

Posted via email from Jasper-net

Thinstation — «худеем» с тонкими клиентами до версии 2.5

|
Доброго времени суток, Хабр!

Относительно недавно в свет вышла новая версия популярного тонкого клиента Thinstation, а именно 2.5. И, конечно же, несет в себе как новые плюшки, так и новые грабли плюс минимум документации по новой версии.

В этой статье (а она расчитана на новичков, особенно для тех, кто слабо знаком с Linux) я опишу как быстро собрать тонкого клиента и сделать его использование достаточно безопасным. Под хабракатом использование смарт-карт, RDP-клиент фирмы 2X и хэппи-энд. Добро пожаловать!


Постановка задачи

Итак, у нас имеется:

    Несколько железяк, гордо именуемых «тонкими клиентами». Например, пара десятков уже давно не новых машинок HP HSTNC-001L-TC.
    Настроенный терминальный сервер, к которому тонкие клиенты будут цепляться. Пусть будет MS Windows Server 2003 или 2008.


А теперь чего, собственно, хотим:

    Загружать тонкие клиенты по сети (бездисково то есть).
    Поддержку тонкими клиентами MS RDP версий 6+ или даже 7, т.к. это более безопасно и круто.
    И не просто MS RDP, а с поддержкой TLS 1.0.
    Авторизацию пользователей с помощью смарт-карт (т.е. проброс смарт-карты c тонкого клиента на сервер).
    Захватить мир.


С чего начнем?

Для бездисковой загрузки наших тонких клиентов (а грузиться они будут по протоколу PXE) нам потребуется настроить DHCP-сервер и TFTP-сервер. Что это, для чего, как происходит загрузка по сети (PXE) и как это настроить хорошо и подробно написано тут. В качестве TFTP-сервера под Windows могу порекоммендовать tftpd32, который можно скачать тут. Несмотря на название, есть версии и для платформы x64.

Далее, если есть желание, можно немного почитать о Thinstation тут, тут и тут (под списком файлов для загрузки). На русском языке информацию можно найти здесь, хотя она уже несколько устаревает. Там расписывается создание и настройка образов Thinstation версии 2.2.2, многое актуально и для 2.5. Непосредственно версии 2.5 посвящена пока лишь одна страничка. Итак, начнем.

Первая сборка

Так как Thinstation основан на Linux'е, значит для сборки тонкого клиента нам потребуется компьютер с установленным Linux'ом (спасибо, КО!). Я использовал Ubuntu 11.10. Также нам понадобится установить Git (если его еще нет) и с его помощью склонировать себе репозиторий с генератором образов:

sudo apt-get install git
cd /home/user/
git clone --depth 1 git://thinstation.git.sourceforge.net/gitroot/thinstation/thinstation
cd thinstation


Read more: Habrahabr.ru
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=habrahabr.ru/blogs/sysadm/136921/

Posted via email from Jasper-net

Caliburn Micro Part 3: More About Events and Parameters

|
So far in this Caliburn Micro tutorial series we have looked at how to get started with using Caliburn Micro in a WPF application, and how to link the view and the view-model together using data binding and events. In today’s tutorial, we will take a look at the more advanced ways of hooking up events and specifying event parameters. To experiment with these features, we will be further extending the application created in the previous two blog posts.

You may remember from the previous blog post that we hooked up events using the help of Caliburn Micro’s naming conventions. All we needed to do was set the name of a button in the view to be the same name as a method in the view-model. Then the Click event of the button will be automatically hooked up to call the appropriate method. Sometimes however you will need to explicitly hook up the events in order to provide event parameters or specify exactly which event you want to use. To do this, Caliburn Micro provides a long syntax and a short syntax. The advantage of the long syntax is its compatability with Microsoft Expression Blend. The short syntax is great if you’re not interested in using a designer and want to keep things short and sweet. Let’s start off with learning how to use the long syntax.

Long Syntax

The best way to begin is to modify the existing application to use the long syntax without changing the current behaviour. Open up AppView.xaml and include these 2 namespaces:

xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:cal="http://www.caliburnproject.org"

Then, simply replace the repeat button with this:

<RepeatButton Content="Up" Margin="15" VerticalAlignment="Top">
  <i:Interaction.Triggers>
    <i:EventTrigger EventName="Click">
      <cal:ActionMessage MethodName="IncrementCount" />
    </i:EventTrigger>
  </i:Interaction.Triggers>
</RepeatButton>


Read more: MindScape }}}
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.mindscapehq.com/blog/index.php/2012/01/24/caliburn-micro-part-3-more-about-events-and-parameters/

Posted via email from Jasper-net

Expression Blend: I made a copy of a UserControl and now it throws an error

|
Don’t you hate it when you are going to do a simple thing like copy a UserControl and then it doesn’t work?  Seriously, how can you steal other peoples work if you have to redo all of their code.

Well first of all, make sure you tell others about the work that you are using, and if the artist or creator asks that you pay for the work, then pay for it or don’t use it.

Now down to business, why can’t you just make a copy of a UserControl and put it to use right way?

Simple, the code behind can’t determined which XAML it is suppose to use:

Now I just copied Christine’s Dancing heart project and was going to break it, I did when I simply copied the user control.  My code behind looked like this:

0638.image_5F00_thumb_5F00_68151363.png

The red squiggly lines mean that something is wrong, and the error seems kind of stupid, but it is unambiguous in it’s statement of ambiguity.

You now have two of these in your program, the line x:Class=”DancingHeart.DancingImage” is repeated twice, once in the copy of the UserControl and once in the original copy.

Read more: Secret Microsoft Communications
QR: expression-blend-i-made-a-copy-of-a-usercontrol-and-now-it-throws-an-error.aspx

Posted via email from Jasper-net

HTML5 CSS3 Javascript vs XAML .net and Silverlight

|
Developers right this second are at some bar / restaurant / lounge / god knows where else being “social” i.e. having geeky discussions about technology, what language/platform is best to use or even better “what’s coolest right now” Smile

I am one of those developers and I must say, when it comes to such discussions I am always biased towards XAML technologies. Yet recently I started diving in what I used to call the “darker side” i.e. HTML5, JS and CSS3 (the “dark side” is reserved for things like Java Smile ). It’s been years (6 to be exact) since I was doing some HTML and Co and I must say; I am really impressed. HTML5 just takes everything to a whole new level BUT what impresses me most is JS and CSS3.

JS because the browsers are natively exposing APIs such as GeoLocation, Canvas drawing, local storage and also indexed DB (and more APIs). BESIDES THAT, what sells JS for me, is the new libraries developers are building such as JQuery and Knockout.js. Working with javascript today is just loads and loads of fun !!

CSS3 because WOW its frekin cool!! The new box modelling with the Flexible box model, the gardients, the transforms, the transitions and I can go on and on…

So yea I must admit, web development (presentation layer) of today is becoming loads of fun! Backend for Web with MVC its also frekin cool! so I guess the questions that readers of my blog / people who know me would ask “Is Marlon turning his back on XAML?” The answer is simple and its NO, my car number plate still says WPF so I guess I cannot change everything now Smile Joking aside, I see both technologies as super awesome and both of them have a different realms (to a certain extend). “to a certain extend” for the reason that WinRT will also support HTML5 JS and CSS3 as a first class citizen just like it will for XAML and C# / C++.

Read more: C# Disciples
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://marlongrech.wordpress.com/2012/01/22/html5-css3-javascript-vs-xaml-net-and-silverlight/

Posted via email from Jasper-net

Jounce 2.0 MVVM with MEF for Silverlight 5 Released

|
I'm pleased to announce the official release of Jounce 2.0 for Silverlight 5. There are quite a number of new features available that I'll review in this post. Most significantly, of course, the code base has been updated specifically to target Silverlight 5. A number of bug fixes, feature requests, and Silverlight 5 features have been added. The DLL for Jounce is still just under 100 KB for release so it remains nimble and lightweight.

There are two ways you can install the latest. Zip over to Jounce at CodePlex to download the binaries and/or the full source. Or, jump into NuGet and install the Jounce package. The package is set up to wire in a default application. To get this functionality, follow these simple steps:

    Create a new Silverlight application. I recommend the basic "Silverlight Application" template as I haven't tested with any others, and it doesn't matter if you host it in a web site and/or choose to use WCF RIA services.
    Delete the App.xaml and MainPage.xaml files. Trust me on this one.
    Jump into the package manager console and type Install-Package Jounce.
    Hold down CTRL and press F5 and you should see a welcome message. That's it. You are ready to write your Jounce application.

What's New

The code base is now CLS compliant.

The application service used to wire Jounce now exposes some configuration properties. You can use this to have Jounce ignore unhandled exceptions (by default, it will intercept these and publish them as a message instead) and also to set the debug level. These used to be parsed from the parameters from the object tag but obviously this did not make sense for OOB applications.

When dynamically loading XAP files (i.e. extension or plugin modules) you can specify a callback that Jounce will call to report progress. This allows you to have more control over the extension points and display a progress message to the end user for example.

The processing of the XAP file URL was updated to allow query strings. This is a common method to dynamically serve up XAP files and/or to manage updates for OOB applications. Jounce used to choke on this but the code was updated to gracefully handle this when you specify the URL to the XAP to download.

Read more: C# Image
QR: jounce-20-mvvm-with-mef-for-silverlight.html

Posted via email from Jasper-net

A few principles for writing blazing fast code in .NET

|
When authoring high performance applications, the following generalized rules can be considered valuable for creating highly performant capabilities:
Share nothing across threads, even at the expense of memory

    Sharing across thread boundaries leads to increased preemptions, costly thread contention, and may introduce other less obvious expenses in L2 cache, and more
    When working with shared state that is seldom or never updated, give each thread its own copy even at the expense of memory
    Create thread affinity if the workload represents saga’s for object state, but keep in mind this may limit scalability within a single instance of a process

    Where possible, isolating threads is ideal

Embrace lock-free architectures

    The fewer locks the better, which is obvious to most people

    Understanding how to achieve thread-safety using lock-free patterns can be somewhat nuanced, so digging into the details of how the primitive/native locking semantics work and the concepts behind memory fencing can help ensure you have leaner execution paths

# dedicated long-running Threads == Number of processing cores

    It’s easy to just spin up another thread. Unfortunately, the more threads you create the more contention you are likely to create with them. Eventually, you may find your application is spending so much time jumping between threads; there is no time to do any real work. This is known as a ‘Live Lock’ scenario and is somewhat challenging to debug
    Test the performance of your application using different threading patterns on hardware that is representative of the production environment to ensure the number of threads you’ve chosen is actually optimal
    For background tasks that have more flexibility in how often they can be run, when, and how much work can be done at any given time, consider Continuation or Task Scheduler patterns and collapse them onto fewer (or a single) threads

    Consider using patterns that utilize the ThreadPool instead of using dedicated long-running threads

Stay in-memory and avoid or batch I/O where possible

    File, Database, and Network I/O can be costly
    Consider batching updates when I/O is required. This includes buffering file writes, batch message transmissions, etc…


Read more: Smelser.net
QR: A-few-principles-for-writing-blazing-fast-code-in-NET.aspx

Posted via email from Jasper-net

Windows 8 Storage and Hyper-V – Part 1: Introduction

|
  Now that the Windows Server 8 beta can be expected any time now – but promised before the last week of February 2012 – it might be a good idea to start looking at several of the groundbreaking storage related technologies that could turn up in Windows 8. I stress the word could because we must always be careful since functionality shown in Pre-RTM builds is never guaranteed to be in the GA release.

I am planning to write a couple of blogs about Windows 8 Storage which in many cases is related to the new version of Hyper-V.

If you are running a SAN but also if your company simply can’t afford a SAN, chances are that you will see significant performance increases when reading, writing, copying, moving data with Windows Server 8. In-box storage manageability with PowerShell will strongly contribute to making Windows 8 Storage one of the major pillars of the Microsoft Private Cloud Fabric. As I have looked at it so far, storage is handled extremely well in Windows Server 8. Mind you this is only what I have determined based on what I have heard and seen on \\build and have personally tested since September 2011 with the Windows 8 Developer Preview.

This edition is not at all intended to be stable and testing with de Developer Preview is a true challenge. As a preparation for the Hyper-V.nu event with several sessions on Windows Server 8, I wanted to try out and show some unique new functionality for moving living Hyper-V guests between different types of storage. I had time for building up the pre-requisites and was able to successfully show a Live Storage Migration of a guest between two SMB2 shares on a ScaleOut File Cluster. But there were several other Live Storage moves that I tested but also want to explore further:

    Live Storage Migrate a guest from USB disk to a local disk
    Live Storage Migrate a guest from a local disk to a new Windows 8 Pool and Spaces virtual disk
    Live Storage Migrate a guest from local disk to shared storage on a single host
    Live Storage Migrate a guest from a shared disk on a single host to a shared disk on a Windows 8 Hyper-V cluster
    Live Storage Migrate a guest from a shared disk on a cluster to a CSV version 2 volume on the same cluster
    Live Storage Migrate a guest from any location to an SMB2 file share on a ScaleOut Fileserver with Continuously Available Shares
    Live Storage Migrate a guest between two SMB2 file shares on the same Windows 8 Hyper-V cluster while the ScaleOut Fileserver cluster is moved between nodes.
    Live Storage Migrate a guest between an SMB2 file share used by one Windows 8 Hyper-V cluster to another Hyper-V cluster or even to another SMB2 file share on another server.


Read more: Hyper-v.nu
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.hyper-v.nu/archives/hvredevoort/2012/01/windows-8-storage-and-hyper-v-part-1-introduction/

Posted via email from Jasper-net

How to make many-to-one relationships on the same table with Hibernate

|
As a developer you may find your self in a situation where an entity may have many children entities of the same type.As an example consider the case where a Category may consists of many sub-Categories.It may be obvious that the previously mentioned example is a clear one-to-many/many-to-one relationship.Let 's see now how such a relationship can be implemented using Hibernate.

Beginning from the database side the category table will look something like this:

create table 'category '(
`id` int(11) NOT NULL AUTO_INCREMENT,
 `name_of_the_category` varchar(150) NOT NULL,
 `parent_category` int(11) DEFAULT NULL,
 PRIMARY KEY (`id`),
KEY `name_of_the_category` (`name_of_the_category`),
 KEY `FK_1` (`parent_category`),
 CONSTRAINT `FK_1` FOREIGN KEY (`parent_category`) REFERENCES `category` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


In the above listing we created a database table named "Category",with fields: id ,name_of_the_category,parent_category and a foreign key between "parent_category" and "id" columns

The next step is to crate th POJO that will represent the database table:

public class Category {
 private int id;
 private String categoryName;
 private Set subCategories;
 private Category parentCategory;
  public int getId() {
 return id;
 }
  public void setId(int id) {
 this.id = id;
 }
  public String getCategoryName() {
 return categoryName;
 }
  public void setCategoryName(String categoryName) {
 this.categoryName = categoryName;
 }
   public Category getParentCategory() {
 return parentCategory;
 }
  public void setParentCategory(Category parentCategory) {
 this.parentCategory = parentCategory;
 }
 public String toString(){
 return getCategoryName();
 }
  public Set getSubCategories() {
 return subCategories;
 }
  public void setSubCategories(Set subCategories) {
 this.subCategories = subCategories;
 }
 }


Read more: Java-only
QR: LoadTutorial.javaonly?id=5

Posted via email from Jasper-net

Expression Blend 4: Gaming the system: Moving an object on the screen

|
0564.image_5F00_thumb_5F00_7EFBB039.png

    We all know that guy who is always gaming the system, it’s so irritating, you don’t quite know how he does it, and his career kind of sucks, but somehow he figures it out.  Of course in software there are a lot of people who game the system, here is a clue: Software is about gaming the system.

So let’s talk about creating a simple moving object thingie using XAML in the Windows Phone, because like my name, we must not mention Silverlight these days.  Weird, Silverlight seems to be hanging around and the HTML 5 is trying to figure out just how does that Silverlight games the system.  But let’s face it, unless Silverlight gangs up with XNA, it takes a lot of work to make Silverlight do games all by itself.

Thanks to Jerry Nixon, http://blogs.msdn.com/jerrynixon, he doesn’t really need the hits, but take a look anyway, he has a bunch of really well written and excellent examples that I am tempted to use in my blogs.  But I won’t, I refuse to increase the quality of this blog.  (And we can mention Jerry Nixon’s name. Smile )
Moving an object on the screen

Ok, let’s take a look at a quick way to move an object on the screen.  It might be cool to be able move an object without writing any code, unless you are writing articles, then it takes longer.  This might be reason we don’t see much being done with codeless programming, maybe not.

Open Expression, remove the existing Grid and stack panel, change the layout to canvas and add an image, I have a dorky stick figure and changed the background to an ugly green.  Now we want to add a MouseDragElementBehavior (which is supported on the phone).

Do this by:

    Changing to the Assets tab
    Select Behaviors
    Drag the MouseDragElementBehavior to the image, that’s it
    Run your application and the image will be dragged by the mouse


Read more: Building games based on Silverlight and Expressions
QR: free-ly-gaming-the-system-moving-an-object-on-the-screen.aspx

Posted via email from Jasper-net

Multithreading and WPF 4.5

|
WPF 4.5 has improved its support for multi-threaded data binding, but the technique is still risky. This report attempts to explain how it works and what’s involved in using it safely.

WPF data binding has always had haphazard support for multi-threading. When an object raises a property changed event on a non-UI thread the data binding infrastructure is kicked into gear. And generally this works, though it isn’t really safe because of potential race conditions. From a computer science perspective it would be more correct to simply disallow cross-thread access, which is actually the case for the collection changed event.

Unfortunately developers don’t always care about correctness, they just want to get something done. So end up with various attempts at a “thread-safe” or “dispatcher-safe” observable collection. In all these attempts the fundamental design is to marshal the collection-changed event to the correct thread before invoking it. In this case the correct thread is whichever one that the dispatcher is running on. Unfortunately this doesn’t eliminate the possibility of a race condition.

With WPF 4.5, Microsoft is offering developers a much safer alternative. By calling BindingOperations.EnableCollectionSynchronization, the WPF data binding engine participates in locking. The default behavior is to acquire a lock on the object specified in the aforementioned call, but you also have the option to use more complex locking schemes. Unfortunately this is an error prone technique; it is easy to forget to acquire the collection’s lock while on the background thread. You can also forget to disable the collection synchronization when the collection is no longer needed, which could create a memory leak.

Another problem with this technique is that it doesn’t protect individual objects. So while the collection is being read under a lock, properties on each item in the collection are not necessarily being safely read. This is mostly a problem for complex getters and properties that cannot be set atomically (e.g. large value types).

Read more: InfoQ
QR: WPF-45-Collections

Posted via email from Jasper-net

Blend Tutorial Part 1: Design Your First Metro Style App with JavaScript, HTML5, CSS

|
Blend Tutorial Part 2: Create the Project—Memory Game
Blend Tutorial Part 3: Add a Style Sheet—Memory Game
Blend Tutorial Part 4: Create a Flexible Layout—Memory Game
Blend Tutorial Part 5: Align Content to The Grid—Memory Game
Blend Tutorial Part 6: Style the Game Board—Memory Game
Blend Tutorial Part 7: Style the Cards—Memory Game
Blend Tutorial Part 8: Add CSS Transitions—Memory Game
Blend Tutorial Part 9: Build and Run Your App—Memory Game

About this series: this tutorial series can help you get started with basic design tasks in Blend 5 for Windows Developer Preview. When you complete all the steps of this tutorial series, you will have created a lightweight, dynamic version of the memory game commonly referred to as “Concentration.” In the game, a number of cards are laid face down. The objective of the game is to turn over pairs of matching cards until all of the matching pairs have been revealed.

Microsoft Expression Blend 5 for Windows Developer Preview and Microsoft Visual Studio 11 Express for Windows Developer Preview can speed up and simplify the app design/development process.
The workflow

Because projects can move freely between Expression Blend for Windows Developer Preview and Visual Studio 11 Express for Windows Developer Preview, you can pick where to start building your app.

You can start designing in Expression Blend for Windows Developer Preview, save your project, and then hand it off to a developer who can use Visual Studio 11 Express for Windows Developer Preview to write and debug the app logic.

Alternatively, a developer can do the coding first in Visual Studio 11 Express for Windows Developer Preview, save the solution, hand it off to you, and you can open it in Expression Blend for Windows Developer Preview, where you can add layout and design components.

Read more: BlendInsider
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://blendinsider.com/tutorial/blend-tutorial-part-1-design-your-first-metro-style-app-with-javascript-html5-css-2012-01-20/

Posted via email from Jasper-net

WCF Service Method Level Security using Message Contract

|
Introduction

This article illustrates how to implement security for a service method, in the context of custom authentication, confidentiality and integrity, using Message Contract. The message is packed with authentication information at the client side in the MessageHeader. The Service intercepts this message and validates the credibility of the consumer client. Besides, we will also check, using Message Contract how can sign or encrypt partial header information and all body information in a message.
Real Life Scenario

There could a service method which is passing sensitive information over the wire and you want to take some exclusive security measure for the service method in question. You can pack a security token in the relevant message header for the service method and validate the same in the service end before returning response. Also, since the information in the message is highly sensitive, you can sign and encrypt the message. We will implement this kind of service method level authentication and message level security for a specific service method, using Message Contract in this article.


Implementing the WCF Service

In order to implement the above discussed concept, we will develop a simple WCF service project. The WCF service has a GetAccountsData method which returns AccountsInfo of a customer on validating CustomerCredential passed as input.

Read more: Codeproject
QR: WCF-Service-Method-Level-Security-using-Message-Co

Posted via email from Jasper-net

WPF Application Quality Guide

| Tuesday, January 24, 2012
In light of the rapid adoption of the WPF and the continuous requests from partners and customers, the WPF team at Microsoft is happy to present the fifth preliminary release of the “WPF Application Quality Guide”. We plan to release the Guide in stages, updating and fine-tuning the content, based on feedback provided by you. This fifth release contains a updated reading roadmap that helps guide you through the sections based on your needs, integration and scenario testing, updated tools section with updated TestApi resources, A1 building a WPF Application Test Suite by Using VSTS, NUnit or xUnit, and A4 considerations for WPF browser applications.


Read more: Windows Client
QR: wpf-app-quality-guide.aspx

Posted via email from Jasper-net

Symantec Admits Its Networks Were Hacked in 2006

| Sunday, January 22, 2012
After having first claimed that the source code leaked by Indian hacking group Dharmaraja was not stolen through a breach of its networks, but possibly by compromising the networks of a third-party entity, Symantec backpedalled and announced that the code seems to have exfiltrated during a 2006 breach of its systems. Symantec spokesman Cris Paden has confirmed that unknown hackers have managed to get their hands on the source code to the following Symantec solutions: Norton Antivirus Corporate Edition, Norton Internet Security, Norton Utilities, Norton GoBack and pcAnywhere.


Read more: Slashdot
QR: symantec-admits-its-networks-were-hacked-in-2006

Posted via email from Jasper-net

Executing multiple SQL statements as one against SQL Server

|
Executing multiple SQL statements

The first variation uses SqlCommand.ExecuteNonQuery to execute two separate SQL statements against the test table. The first one updates the field somevalue by one and the second by two. The method looks like:


      /// <summary>
      /// Executes two separate updates against the the connection
      /// </summary>
      /// <param name="connectionString">Connection string to use</param>
      /// <param name="generateError">Should the statement generate an error</param>
      /// <returns>True if succesful</returns>
      public static bool ExecuteMultipleUpdates(string connectionString, bool generateError = false) {
         System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection();
         System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand();
         int rowsAffected;

         connection.ConnectionString = connectionString;
         command.CommandText = @"
UPDATE MultiStatementTest SET somevalue = somevalue + 1;
UPDATE MultiStatementTest SET" + (generateError ? "WONTWORK" : "") + " somevalue = somevalue + 2;";
         command.CommandType = System.Data.CommandType.Text;
         command.Connection = connection;

         try {
            connection.Open();
            rowsAffected = command.ExecuteNonQuery();
         } catch (System.Exception exception) {
            System.Windows.MessageBox.Show(exception.Message, "Error occurred");
            return false;
         } finally {
            command.Dispose();
            connection.Dispose();
         }
         System.Windows.MessageBox.Show(string.Format("{0} rows updated",
            rowsAffected, "Operation succesful"));

         return true;
      }

So the CommandText property contains all the statements that are going to be executed in this batch. The statements are separated by a semicolon.

After the batch has been executed the rows have been updated twice so the contents of the table look something like:

id      somevalue
---     ---------
1       857
2       76
3       735
4       549
5       270 

One important thing to notice is that the amount of affected rows returned by the ExecuteNonQuery is 10. There were five rows in the table and each one of them got updated twice so the total amount of updates is 10. So even with batches it's possible to check that correct amount of rows got updated regardless which statement makes the update.
Executing two SELECT statements using a data reader

The next test is to execute two different SELECT statements and read the results using a SqlDataReader class. The method is:

      /// <summary>
      /// Executes two separate select statements against the the connection using data reader
      /// </summary>
      /// <param name="connectionString">Connection string to use</param>
      /// <param name="generateError">Should the statement generate an error</param>
      /// <returns>True if succesful</returns>
      public static bool ExecuteReader(string connectionString, bool generateError = false) {
         System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection();
         System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand();
         System.Data.SqlClient.SqlDataReader dataReader;
         System.Text.StringBuilder stringBuilder;
         bool loopResult = true;

         connection.ConnectionString = connectionString;
         command = new System.Data.SqlClient.SqlCommand();
         command.CommandText = @"
SELECT somevalue FROM MultiStatementTest WHERE somevalue%2 = 1;
SELECT somevalue FROM MultiStatementTest " + (generateError ? "WONTWORK" : "WHERE") + " somevalue%2 = 0;";
         command.CommandType = System.Data.CommandType.Text;
         command.Connection = connection;

         try {
            connection.Open();
            dataReader = command.ExecuteReader();
            while (loopResult) {
               stringBuilder = new System.Text.StringBuilder();
               while (dataReader.Read()) {
                  stringBuilder.AppendLine(dataReader.GetInt32(0).ToString());
               }
               System.Windows.MessageBox.Show(stringBuilder.ToString(), "Data from the result set");
               loopResult = dataReader.NextResult();
            }


Read more: Codeproject
QR: Executing-multiple-SQL-statements-as-one-against-S

Posted via email from Jasper-net

Introduction to bddify

|
If you are new to BDD you may want to read BDD to the rescue first.
This is an introduction and a start of a series about bddify, a powerful BDD framework for .Net, called 'Bddify In Action':

Using bddify

Customizing and extending bddify

    Customizing html report
    Creating your own report
    Create a step scanner

A bit of history

In January 2011 I started working with a team who did not have any exposure to BDD. The codebase they were working on could benefit from testing in general but more so from BDD; so I introduced them to the concept and they liked it; but the existing frameworks did not feel like a good fit for the team and organization. One of the reasons was that they were not doing Agile. The existing frameworks would work very nicely in Agile organizations but not as easily in non-Agile teams. Sure, BDD was born in Agile land; but in my experience it is as useful (if not more) for non-Agile teams. Also it always felt like an extension to TDD in the sense that in order to learn BDD you should first know and do TDD. This made BDD rather unreachable for average developers.

As such I started an attempt to make BDD very simple for every .Net developer regardless of their experience, knowledge of BDD and testing or whether they work on an Agile or non-Agile organization.

... and bddify was born as a one-file-framework. Well the first few incarnations were rather crude but soon it was turned into a fully-fledged BDD framework with quite a few handy and cool features. Since then bddify has been used by many teams in Australia and overseas: some developers learnt BDD through bddify and some switched to bddify after having used other BDD frameworks and luckily they are all very happy with it.

After one year, today I am pleased to announce the release of bddify V1. The code is now hosted on BitBucket and you can find it here.
What's it called?

The framework is called bddify because it BDDfies (as in turns into BDD) your otherwise traditional unit tests. With bddify it is very simple to turn your AAA tests into a BDD test/behavior. Admittedly the 'i' in the middle makes it a bit confusing. At some point I was thinking about removing the 'i' and calling it 'bddfy' or 'BDDfy' but that would require a lot of work and many links would break and I would have lost a lot of history. So I decided to leave the 'i' there for now. What do you think?

Oh and BTW it is pronounced B D Defy.


Read more: bddify
QR: introduction

Posted via email from Jasper-net

JSON Enabled WCF Services - Part 1

|
Introduction

This article describes the process of a WCF service configuration for working with data in JSON format. Although the configuring process seems to be simple, there are some particularities which cannot be ignored.


Background

As the lead developer in a multinational software company, I often develop Rich Internet Applications and do care about ensuring that an app would have a long and happy life. And lately, I have a really heavy headache when it comes to the decision about using the proper technology. From one side, the two most used ones are Silverlight and Flash. Both of them are cross-platform technologies, so an application created on Silverlight or Flash will look the same in all browsers.

From the other side, IMHO, these technologies have one serious disadvantage: they are limited in use. You can’t use a Silverlight application on Linux or a Flash application on iOS. I didn’t even mention mobile systems that are an essential part of our life. The majority of modern mobile devices and tablets don’t provide full support for Silverlight and Flash.

The use of HTML and JavaScript allows eliminating compatibility issues. All that’s needed to work with such applications is a web browser on any device.

I won’t bother you further with reasoning pros and cons of different technologies – I use them all, and the decision often depends on a particular project. But today I would like to tell you what made up my mind to choose HTML and JavaScript rather than other technologies for one of the projects I have been working on.


Creating a WCF service

In one of our projects, I decided to use HTML+JavaScript binding as a client part of an application. The client application interacts with a server to get data. It is possible to use a WCF service, MVC framework controllers, and Web Handlers as a service. In our case, we need to use a general format for data with which the client’s application and the service will interact. So, we had to choose what to use: XML or JSON. After some tests and considerations, we stooped on JSON. We had several reasons which determined the use of JSON.

Now, I want to tell you how we created the WCF service which passes data in JSON format.

The first step is to add a WCF service to the website.

Select the WCF Service in the Add New Item dialog window (I add the service with the WcfJsonService name). After this, the WcfJsonService.svc file is added to the application along with two files: IWcfJsonService.cs and WcfJsonService.svc.cs.


Read more: Codeproject
QR: JSON-Enabled-WCF-Services-Part-1

Posted via email from Jasper-net

StatLight v1.6 is Out

|
In short, it allows you to run your Silverlight tests on a Continuous Integration server or alongside your daily development.

Fore more information go check out the project site http://statlight.codeplex.com


Some ramblings (about the project).

It’s funny how the release cycle of this open source project has turned out. I don’t have any sort of calendar reminder that pops up saying “it’s been 4 or 5 months and time to get out a new release”. However, since I first open sourced the project I’ve put out a new release on a pretty consistent 4/5 month cycle and have done so since December 2009. It just so happens about every 4/5 months there is enough features and or fixes piled on top that It’s time to put out an “official” build. Not bad for a part time (free to the community) gig.

Thanks to the guys at CodeBetter and JetBrains for giving us a TeamCity build server, I put a build of StatLight up on their TeamCity server. This has been great for myself. When issues or feature request come in, all I have to do is dev them out, push the code out to GitHub and the TeamCity build produces an artifact that people can pull down and use/test right away.

What’s the difference between a TeamCity build and an “official” release of StatLight? To be honest, NOTHING. When I decide it’s time to release an “official” build, I head over to the TeamCity, download the latest build and throw it up on CodePlex and NuGet and call it the “official” release. I guess the biggest difference is this means I now have to go update the documentation out on the CodePlex site. I’m not particular happy with this process and hoping my new pet project using http://sphinx.pocoo.org/ to generate a CHM documentation file will help with future versioning of the tool. I’m working on a new blog post for how I got this working…


Some more ramblings (about this release)

This build comes with some pretty major internal refactorings. Finally, after 3 years, I’ve put in an IOC container (really liking TinyIOC for this task). This cleaned up quite a bit of the codebase. Introduced a couple regressions, bug the community was great in helping me figure this out and I’ve beefed up my test coverage to avoid this in the future. There is more cleanup to do in the codeba


Read more: Developing on Staxmanade
QR: statlight-v16-is-out.html

Posted via email from Jasper-net