70-486 Experience

Just successfully completed 07-486 exam in first attempt. Total Hours logged in preparation were about near to 20.

As i can’t spill every bean that was in the test, but still can give general idea about how it was.

  1. 3 Case Studies – i thought those would be less. But it was fun doing it, each had more questions than i expected. 6, 10 and than 7.
  2. 22 Multiple Choice/ Code completion questions.
  3. Custom Mvc Model Binder related to composite value
  4. No SignalR question. I thought there would be one.
  5. Multiple design questions related to css/ html
  6. Web Farms 
  7. State management
  8. Azure Worker Roles and RDP Configuration management/ X509 Certification
  9. Authorization/ Authentication, how to limit access to user.
  10. MVC Routing/ Mapping
  11. Some questions related to http Handlers and Module implementation choice based on the problem given.

Overall, it was nice experience and if i hadn’t been working with asp.net mvc/ asp.net – it would be really hard to pass it through. Still, i could have done better if i studied as some of the questions were so in depth and we rarely use those kind of stuff and real application, or not care too much about how small things work. So, please analyze your expertise with asp.net mvc and try following study guides out there.

I did follow, http://www.bloggedbychris.com/2012/11/06/microsoft-exam-70-486-study-guide/ and also go through tutorials at asp.net site for mvc4 and mvc5. The exam also includes the questions related to MVC5.

Helpful links: 

  1. http://www.bloggedbychris.com/2012/11/06/microsoft-exam-70-486-study-guide/
  2.  http://www.asp.net/mvc
  3. http://pluralsight.com/training/Courses/TableOfContents/aspdotnet-mvc-advanced-topics
  4. http://pluralsight.com/training/Courses/TableOfContents/mvc4
  5. http://pluralsight.com/training/Courses/TableOfContents/aspdotnet-mvc5-fundamentals

Thanks,

Riz

JQuery Mobile and Asp.net WebForms 4.5

Hi,

I was searching for some examples on the responsive web design and frameworks and i was impressed by JQuery mobile and it’s roadmap towards the future and it’s broad capabilities. You can view JQuery Mobile at http://view.jquerymobile.com/1.3.0/

So, in further searches – it was obvious that lesser people have tried it with web forms. I didn’t find any examples (may be there are.. but nothing good appeared on google search).

So here is a another to the point simple example:

Steps

  1. Create Empty Web Forms Project (VS 2012)
  2. From NuGet – Add Jquery
  3. Add Jquery UI (For normal site)
  4. Add JQuery Mobile (For Mobile Site)
  5. Add “Site.Master” Master page
  6. Add “Site.Mobile.Master” Page (To used as master page for mobile site)
  7. Add Default.aspx
  8. Add Default.mobi.aspx
  9. Add Global.asax

Main Idea

“Every .aspx page in normal page has its respective .mobi.aspx” It’s hybrid project and we will simple use asp.net url routing to map if the request comes from mobile site (only in case of .aspx) – All other things remain same.

So,

Here are questions:

  1. How to do URL Rewrite?
  2. How to setup jQuery Mobile?

1- How to do URL Rewrite?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.Routing;
namespace Test.WebWithMobile
{
public class Global : System.Web.HttpApplication
{
        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            if (Request.Browser.IsMobileDevice)
            {
                //Request.Url.MakeRelativeUri(new Uri(Request.Url.AbsoluteUri)).ToString() + Request.Url.AbsoluteUri.Replace(“.aspx”, “.mobi.aspx”)
                if ((!Request.Url.OriginalString.ToLower().Contains(“mobile”)
                    && Request.Url.OriginalString.ToLower().EndsWith(“.aspx”))
                    || Request.Url.OriginalString.IndexOf(“.aspx”) == -1)
                {
                    var url = Request.Url.OriginalString;
                    if (url.ToLower().IndexOf(“.aspx”) == -1)
                        url += “Default.aspx”;
                    url = url.Replace(“.aspx”, “.mobi.aspx”);                    
                    var path = Request.Url.MakeRelativeUri(new Uri(url));
                    HttpContext.Current.RewritePath(“~/” + path);
                }//Request.ApplicationPath);
            }
}
}

2- How to setup jQuery Mobile?

<head runat=”server”>
<meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″ />
<title></title>
<link href=”Content/jquery.mobile-1.3.0.min.css” rel=”stylesheet” />
    <script src=”Scripts/jquery-1.9.1.min.js”></script>
    <script src=”Scripts/jquery.mobile-1.3.0.min.js”></script>
<asp:ContentPlaceHolder ID=”head” runat=”server”>
</asp:ContentPlaceHolder>

</head>
<body>
<form id=”form1″ runat=”server”>
<div data-role=”page”>
            <div data-role=”header”>Mobile Header</div>
            <div data-role=”content”>
<asp:ContentPlaceHolder ID=”ContentPlaceHolder1″ runat=”server”>
</asp:ContentPlaceHolder>
</div>
        </div>
</form>
</body>

That’s It !!!

Surprised … but that’s it… This will get your going with query mobile and setting up web solution.

  1. Intro to JQuery Mobile
  2. Responsive Web Design
  3. PluralSight Training
  4. Download Source Code

JQM

SignalR – Simple Implementation

Hi Guys,

Back with an interesting post here. I was recently trying to find a simple and to the point example of SignalR with no big code snippets to work with. It was somewhat complex to understand the whole picture. Anyways, here is the “to the point” with no extra details small application.

It consists of

  1. Web Application (Our Host for SignalR)
  2. Windows Client Application (Demonstrating how you can invoke SignalR and Interact with)
  3. Source Code attached at end of this article
Web Application – The Host
Follow these steps
* Create Empty VS 2012 – Web Application Project
* Install SignalR Package from NuGet (Microsoft ASP.Net SignalR)
Signlar_Select
* Add Global.asax
* Put in following Code

       protected void Application_Start(object sender, EventArgs e)        {

            RouteTable.Routes.MapHubs();

        }

*  Add Default.aspx

* Paste following HTML

<%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”Default.aspx.cs” Inherits=”WebCommunicator.Default” %>

<!DOCTYPE html>

<html xmlns=”http://www.w3.org/1999/xhtml”&gt;

<head runat=”server”>

    <title></title>

    <script src=”Scripts/jquery-1.6.4.min.js”></script>

    <script src=”Scripts/jquery.signalR-1.0.1.js”></script>

    <script src=”signalr/hubs”></script>

    <script src=”Scripts/app.js”></script>

</head>

<body>

    <form id=”form1″ runat=”server”>

    <div>

        <input id=”txt” style=”width: 200px;” /><input type=”button” id=”btnSend” value=”Send”/>

        <div id=”messages”>

        </div>

    </div>

    </form>

</body>

</html>

 *  Add Hub code in App_Code folder for the project

    

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using Microsoft.AspNet.SignalR;

using Microsoft.AspNet.SignalR.Hubs;

 

namespace WebCommunicator.App_Code

{

    [HubName(“commHub”)]

    public class CommunicationHub : Hub

    {

        public void send(string message)

        {

            Clients.All.addMessage(message);//this should be in js

            Clients.Caller.sendAcknlowedge(message + ” received …”);

        }

    }

}

*  Add app.js in Scripts folder in web project

$(document).ready(function () {

    $(function () {

        var commHub = $.connection.commHub;

        commHub.client.addMessage = function (message) {

            $(“#messages”).append(“<li>” + message + “</li>”);

        };

        commHub.client.sendAcknlowedge = function (message) {

            $(“#messages”).append(“<li><b><i>Server Responded: ” + message + “</i></b></li>”);

        };

        $(“#btnSend”).click(function () {

            commHub.server.send($(“#txt”).val());

        });

        $.connection.hub.start();

    });

});

AND THAT’s IT FOR Server Side Code …

Easy Right? 🙂

Now, Let’s make Windows Client for it…

Windows Client

* Create a New Windows Form Project (You can make WPF/ Windows Phone Etc …)

* Install Client Package for SignalR from NuGet

Full Code Snippet for the Window Form (Paste this code and add a text box and two buttons in designer)

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

using Microsoft.AspNet.SignalR;

using Microsoft.AspNet.SignalR.Client;

using Microsoft.AspNet.SignalR.Client.Hubs;

 

namespace WebCommunicator.WinClient

{

    public partial class Form1 : Form

    {

        IHubProxy proxy;

        HubConnection connection;

        public Form1()

        {

            InitializeComponent();

            this.FormClosing += Form1_FormClosing;

        }

 

        void Form1_FormClosing(object sender, FormClosingEventArgs e)

        {

            if (connection != null)

                connection.Disconnect();

            connection = null;

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

//Put your url here.. i published to iis before using it from client.

             connection = new HubConnection(@”http://172.16.27.128/WC/“);

            proxy = connection.CreateHubProxy(“commHub”); //name from the hubName attribute

           //to receive the callback from server. You can do anything on this!

             proxy.On(“sendAcknlowedge”, 

                msg => 

                this.Invoke(() => listBox1.Items.Add(msg)));

            connection.Error += connection_Error;

            connection.Start().Wait();

        }

        void connection_Error(Exception obj)

        {

            MessageBox.Show(obj.Message);

        }

//send message to server

        private void button2_Click(object sender, EventArgs e)

        {

            proxy.Invoke<string>(“send”, textBox1.Text); //this “send” is defined on hub

        }

    }

    public static class ControlExtensions

    {

        public static void Invoke(this Control Control, Action Action)

        {

            Control.Invoke(Action);

        }

    }

}

That’s IT for client…

Now, as you have already deployed the web application… You can open multiple browsers from a machine or from multiple machine and see the magic.

I had two machines (Mac and Windows) – Used safari from mac and  windows for forms app and IE test… It worked all great.

Signlar in Action

NOTE:

This is really to the point working solution. I will describe each item in next article soon. Also you can find details for each of them everywhere on the internet. I had to share this as i had problem gathering information. So, hopefully that will some of people.

Gotchas:

  1. Leave aside what you know about applications. Just start with it. If you will think too much, you will never get it working.
  2. Remember HubName
  3. Make sure order of js files inclusion is correct, just like mentioned above
  4. if you get $.connection as undefined means that you don’t have javascript files loaded correctly.

You can download source code from here… WebCommunicator.zip (Source Code)

JQueryUI – Showing New Menu Widget Horizontally

Showing JQuery menu Horizontally through CSS

I was trying the menu widget from JQuery UI. It looks good with lot of ability. But as usual i had to tweak it a little bit. You can check this at http://jqueryui.com/menu/#navigationmenu

Problem:

The menu on the demo site appears to be Vertical aligned – it grows vertically, and i would like it to be horizontal.

Like

Menu 1 – Menu 2 – Menu 3

Instead of

Menu 1

Menu 2

Menu 3

Solution:

So, for doing with minimal changes here is what you need to do, just define following css classes:

#menu li { display:inline-block; width: auto; }

#menu li.sub { display:block; width: auto;}

Where menu is the ul element for menu, and li (the sub menus, the second level) are marked with “sub” class. Here is the HTML markup for the reference.

display:inline-block; will render the li as inline – so they will appear in the same line side by side.

for Sub menu under each li you need to set them as “block”, so they appear vertically.

<ul id=”menu“>

<li><a href=”?Aberdeen”>Admin</a></li>

<li>

<a href=”?Ada”>Themes</a>

<ul>

<li class=”sub”><a href=”?Ada”>Default</a></li>

<li class=”sub”><a href=”?Saarland”>Test 2</a></li>

<li class=”sub”><a href=”?Salzburg”>Test 3</a></li>

</ul>

</li>

<li><a href=”?Adamsville”>Support</a></li>

<li><a href=”?Addyston”>Release Notes</a></li>

<li><a href=”?Addyston”>My Details</a></li>

</ul>

Hopefully, it will help people out.

UPDATED: http://jsbin.com/afepiz/31/edit (JSBIN)

Enjoy,

Thanks,

Riz

Updating JQuery 1.4+ (or older) to 1.7+ (“attr” replacement)

We were trying to update the Jquery from 1.4 to 1.7 to get new functions in and also to get better working with JQuery UI and with jqGrid.

Suddenly we hit a ROAD BLOCK! the Jquery decided to change the behaviour of method to soemthign different. We used attr function extensively in our app, so replacing it in 3000 location and than verifying it would mean lot of typos and QA effort. They changed it to prop !

So we just simply wrote and override to attr! and extended jQuery…

jQuery.fn.attr = function(a, b) {
if (a == null && a == undefined
&& b == null && b == undefined) {
return ;
}
if (a != null && b != null)
return $(this).prop(a, b);
if (a != null && (b == null || typeof (b) == “undefined”))
return $(this).prop(a);
}

copy this into your code and enjoy beauty of it…

New Module for FogBugz @ Time Management System

Time Management System

We have just built a new time management system for vanguard software group, that integrates seemlessly with fogbugz. http://www.fogcreek.com/fogbugz/

FogBugz is the world’s easiest bug tracking system, built for teams who are serious about shipping great software.

The effort was put to make time spent on case report easy for developers/ managers to report. Which will in turn help management see where we the load and how we can make it more happy place to work. With this simple goal, we developed and we are going to reep its benefits soon.

Technologies Used:

  • Asp.net
  • C#
  • Ajax
  • JQuery
  • HTML
  • DHTML
  • jQGrid

Riz

NOTE: FogBugz is trademark of “Fog Creek Software” http://www.fogcreek.com/contact.html

Reducing XAP Size in Silverlight and Problems

We were having problem with reducing XAP size. Basically third party were not getting picked automatically with the “Application Library Caching” in silverlight.

So searched a little we found out that based on following articals, we needed to have “.extmap.xml” for each assembly that we used in Silverlight.

For Instance InfragisticsSL4.Controls.Editors.v10.3.extmap.xml, now this file contains following mapping xml for that assembly.

<?xml version=”1.0″?>
<manifest xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema“>
  <assembly>
    <name>InfragisticsSL4.Controls.Editors.v10.3</name>
    <version>10.3.20103.1006</version>
    <publickeytoken>7dd5c3163f2cd0cb</publickeytoken>
    <relpath>InfragisticsSL4.Controls.Editors.v10.3.dll</relpath>
    <extension downloadUri=”InfragisticsSL4.Controls.Editors.v10.3.zip” />
  </assembly>
</manifest>

NOTE:

  1. version, publickeytoken should be same as per assembly.
  2. The ExtMap XML files need to be at the Location from where you added refrence to silverlight project. (like some seperate folder for assemblies)
  3. You can download EMM tool fromhttp://blogs.microsoft.co.il/blogs/alex_golesh/archive/2009/07/16/small-utility-extmap-maker.aspx and make your life easy.

References:

http://forums.esri.com/Thread.asp?c=158&f=2455&t=297234

http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2009/07/16/small-utility-extmap-maker.aspx

Thanks,

JOB: Require Senior Asp.NET Developers x 2

Hi,

We are require another Asp.net Developer at Vanguard Software Group for their pakistan office.

Experience Required: 4+

Number of Post: 2 now …

What we offer:

  1. Smooth Enviornment
  2. Good work ethics
  3. Laptop
  4. Medical
  5. Paid Leaves
  6. Opportunity to learn new things
  7. No LATE SITTINGS 🙂 – Guaranteed

So, send in your Cvs to rizwan@vsgsolutions.com / rizworks@gmail.com

Web: http://www.vsgsolutions.com

Looking forward for good ones…

Thanks,

 

Thanks,