Greg Robinson's Blog

I report it, you decide

Click Once

Custom Authentication in Windows Forms

DataBinding Stuff

Favorite Links

My book contribution

My Book Reviews

My Company

My favorite bloggers

My Personal Life

Richmond, VA .NET Users Group

Smart Client Stuff

What I am reading

June 2005 - Posts

VirtualMode and DataGridView

The new DataGridView control allows you to run the control in VirtualMode.  This is a feature if you will (sounds like a nightmare to me) where one can show thousands or even millions of rows in a grid and avoid the performance\memory hit.

Long story short, you tell the control to run in VirtualMode and then, as the user scrolls down the grid (as cells are painted\displayed) you can handle the CellValueNeeded (provide a value for a cell when it's rendered versus holding all the data in memory)  and CellValuePushed (if you want to support editing) .  I only hope developers carefully consider what they are doing when they use this feature.  Or, for that matter, carefully considering presenting thousands or millions of rows in a tabular fashion at one time. 

If I am ever on a project where I need to display thousands of rows, or millions, please shoot me, or better yet, shoot the customer  ;-)

 

 

 

Mini Code Camp in Charlotte, NC

If you like to attend the mini-Code Camp in Charlotte, NC August 20th then register here:


http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032277840&Culture=en-US

Know your sql server connection string

We are going live at 2 clients this week.  I wanted to make sure our sql server connection string was good to go so i dug into the sdk just to make sure. 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlConnectionClassConnectionStringTopic.asp

This link is invaluable for understanding all the different settings and their possible values.  Though there are default values, I go ahead and explicitly set them in the connection string (encrypted of course).

 

 

 

Creating a codegroup from an installer class

We install a small, lightweight exe to client machines that loads our application from a web server. 

Most of our assemblies need to run in a FullTrust sandbox. 

We added an installer class that runs when the msi runs that creates 2 code groups.  We also added logic that removes the code groups on an uninstall. Below is the code from the Installer class; enjoy and I hope it helps you out. 

 

Imports System.ComponentModel
Imports System.Configuration.Install
Imports System.Reflection
Imports System.Security
Imports System.Security.Policy
Imports System.Security.Permissions
Imports System.Configuration.ConfigurationSettings
Imports System.Xml


<RunInstaller(True)> Public Class Installer
    Inherits System.Configuration.Install.Installer

#Region " Component Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Component Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Installer overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Component Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Component Designer
    'It can be modified using the Component Designer. 
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        components = New System.ComponentModel.Container()
    End Sub

#End Region

    Private Sub SetSecurity(ByVal address As String, ByVal type As String)

        Dim ph As System.Collections.IEnumerator
        Dim pl As System.Security.Policy.PolicyLevel
        Dim found As Boolean

        ' retrieve the security policy hierarchy
        ph = SecurityManager.PolicyHierarchy

        ' loop through to find the Machine level sub-tree
        Do While ph.MoveNext
            pl = CType(ph.Current, PolicyLevel)
            If pl.Label = "Machine" Then
                found = True
                Exit Do
            End If
        Loop

        If found Then
            ' see if the codegroup for this app already exists
            ' as a machine-level entry
            Dim cg As CodeGroup
            For Each cg In pl.RootCodeGroup.Children
                If cg.Name = "AM.NET " & type Then
                    ' codegroup already exists
                    ' we assume it is set to a valid
                    ' permission level
                    Exit Sub
                End If
            Next

            ' the codegroup doesn't already exist, so
            ' we'll add a url group with FullTrust
            Dim ucg As UnionCodeGroup = _
              New UnionCodeGroup(New UrlMembershipCondition(address), _
              New PolicyStatement(New NamedPermissionSet("FullTrust")))
            Select Case type
                Case "WAN"
                    ucg.Description = "This code group grants the FullTrust permission set to assemblies from the " & _
                        "external AM.NET web server url."
                Case "LAN"
                    ucg.Description = "This code group grants the FullTrust permission set to assemblies from the " & _
                        "internal AM.NET web server url."
            End Select
          
            ucg.Name = "AM.NET " & type
            pl.RootCodeGroup.AddChild(ucg)
            SecurityManager.SavePolicy()
        End If

    End Sub    ' SetSecurity

    Private Sub UnSetSecurity(ByVal type As String)

        Dim ph As System.Collections.IEnumerator
        Dim pl As System.Security.Policy.PolicyLevel
        Dim found As Boolean

        ' retrieve the security policy hierarchy
        ph = SecurityManager.PolicyHierarchy

        ' loop through to find the Machine level sub-tree
        Do While ph.MoveNext
            pl = CType(ph.Current, PolicyLevel)
            If pl.Label = "Machine" Then
                found = True
                Exit Do
            End If
        Loop
        If found Then
            Dim cg As CodeGroup
            For Each cg In pl.RootCodeGroup.Children
                If cg.Name = "AM.NET " & type Then
                    Exit For
                End If
            Next
            If Not cg Is Nothing Then pl.RootCodeGroup.RemoveChild(cg)
            SecurityManager.SavePolicy()
        End If

    End Sub    ' UnSetSecurity

    Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)

        Dim dllConfigFileName As String = New Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase & ".config").LocalPath
        Dim dllConfig As New System.Xml.XmlDocument
        dllConfig.Load(dllConfigFileName)
        Dim internalCodeGroupNode As System.Xml.XmlNode = _
                dllConfig.SelectSingleNode("//configuration/appSettings/add[@key='InternalCodeGroup']")

        Dim internalCodeGroupValue As String = _
                internalCodeGroupNode.Attributes("value").InnerText

        Dim externalCodeGroupNode As System.Xml.XmlNode = _
               dllConfig.SelectSingleNode("//configuration/appSettings/add[@key='ExternalCodeGroup']")
        Dim externalCodeGroupValue As String = _
                externalCodeGroupNode.Attributes("value").InnerText

        If Not internalCodeGroupValue Is Nothing AndAlso Not internalCodeGroupValue.Trim().Length() = 0 Then
            Me.SetSecurity(internalCodeGroupValue, "LAN")
        Else
            Throw New InvalidOperationException("The application setting InternalCodeGroup is invalid")
        End If

        If Not externalCodeGroupValue Is Nothing AndAlso Not externalCodeGroupValue.Trim().Length() = 0 Then
            Me.SetSecurity(externalCodeGroupValue, "WAN")
        Else
            Throw New InvalidOperationException("The application setting ExternalCodeGroup is invalid")
        End If

    End Sub    ' Install

    Public Overrides Sub Uninstall(ByVal savedState As System.Collections.IDictionary)
        Me.UnSetSecurity("LAN")
        Me.UnSetSecurity("WAN")
    End Sub    ' Uninstall
End Class
   

MS is all over the place these days

http://www.eweek.com/article2/0,1759,1785618,00.asp

I don't post this to be negative.  Seems MS is dabbling in all kinds of software now.  What's next?

DataBinding 2.0

I have made my way through 5 chapters in the DataBinding book review I am doing for Addison Wesley.  Lots of good stuff on it's way, stuff I wish we had 2 years ago.

BindingSource, BindingNavigator, TableAdapter (if you use typed DataSets) will be some of your new friends.  BindingSource will save you a lot of time, time we have already invested though...oh well.

The ToolStrip control is nice, though, once again we have already implemented out own. 

More to come.... 

 

 

Free Tech Books are always nice

http://msdn.microsoft.com/vbasic/whidbey/introto2005/

Richmond, VA .NET Opportunities
I would like to pass along the following job openings.  If you are interested, please contact Mike Richardson at 804.513.8131 or send Mike your resume (mrichardson@alterthought.com).  Mike is looking for excellent .NET candidates for the following positions:
 
1.  Senior .NET Architects:
 

ALTERthought, an integrated consulting, distributed system’s engineering, and product development firm, has opportunities for Senior .NET Architects. These opportunities will allow the candidate to make his or her mark on the organization through diverse responsibilities in groundbreaking internal and client services initiatives.

 

The individual will serve as a key technological leader for complex distributed systems (re)-engineering projects.

 

OVERVIEW

The Senior .NET Architect participates as part of a larger team for ALTERthought internal and client-oriented initiatives. He or she helps support ALTERthought’s core value of Technology and Innovation through implementation and refinement of leading and emerging technologies for internal as well as client products/solutions. The Senior .NET Architect is a well-rounded professional with excellent interpersonal skills backed by solid engineering expertise.  This candidate will drive and establish architectural direction and design oversight and work with cutting-edge technology, while keeping up-to-date on current technologies and trends in the marketplace.  Candidate will also support ALTERthought’s core value of Commitment to Employees by providing mentoring and coaching to software engineers. The Architect also supports ALTERthought’s core value of Customer Commitment through professional strategic engineering leadership, software feature/complexity negotiation, and customer relationship development.

 

JOB REQUIREMENTS

1.       Reviews concept and functional specifications and create high-level design and architectural documents

2.       Applies object-oriented principals to design critical new components of enterprise software applications

3.       Works with the business analysts and the product management team in understanding the business goal or problem

4.       Designs or modifies product features in a flexible and scalable manner

5.       Provides technical assistance and direction to more junior members of the team

6.       Creates high level proof of concept or prototypes

7.       Works with the Lead Software Engineers to give clear guidance on implementing the architectural solution

8.       Reviews technical specifications, code and provide feedback for improvements

9.       Works with other members of the Architecture team to come up with a solution that is feasible in all tiers

10.   Works with Project Managers and Management to develop project estimates

11.   Evaluates third party solutions and presents recommendation to the management team

12.   Works on multiple application development initiatives simultaneously4 + years experience with various software development methodologies preferably the RUP/Agile/XP is strongly desired

13.   Experience with XP and agile methodologies is highly desirable

14.   Facility with MS Project strongly desired

 


JOB QUALIFICATIONS

 

1.       7+ years of experience in designing and developing software applications

2.       3+ years of experience leading and architecting large scale software development projects, including internet applications

3.       Expert knowledge of the Microsoft Windows environment, Microsoft .NET technologies and languages and distributed software architecture

4.       Proficiency in web application and business components design and implementation

5.       Proficiency in Web Services design and implementation

6.       Strong logical problem solving and troubleshooting skills

7.       Strong experience with key enterprise application design approaches including service-oriented architectures, transactions, concurrency, object-relational data access, and scalability on the Microsoft . NET platform

8.       Expert in reusable software components and frameworks

9.       Expertise building enterprise applications against SQL Server database or equivalent

10.   Familiarity with many Software Design Patterns

11.   Demonstrated good judgment in selecting methods and techniques for obtaining solutions, initiative, and a willingness to learn and employ new technologies

12.   Knowledge of system performance assessment is a plus

13.   Experience with multi-thread, localization and . NET framework is a must

14.   Expert in understanding of the Object Oriented Design

15.   Quickly understands the application architecture

 

NOTE: We will consider all candidates for this position, but a re-location package may or may not be offered.

 

ABOUT ALTERTHOUGHT:

ALTERthought is a client-first distributed systems consultancy that helps its business partners lead in their fields through technology and commerce innovation. Clients include the Global 2000, esteemed online brands, and leading mid-market companies. Since its inception in 1998, the integrated consulting and product engineering firm has collaborated with its clients to envision, architect, and deliver business results through intelligent technology solutions while developing its own ground-breaking software concepts.  ALTERthought is headquartered in Richmond, Virginia with offices in the National Capital Region.

 

ALTERthought's software engineering and business consulting offerings include: full lifecycle software development, enterprise architectural engineering, mentoring, estimation and budgeting, product planning, short-term executive staffing, project management, business strategy, business process engineering, information technology strategy, open source strategies, and digital security. For more information, visit the company's website at: www.alterthought.com.
 

 
2.  Senior .NET Engineers:
 

OVERVIEW

The Software Engineer/Analyst participates as part of a larger team for ALTERthought internal and client-oriented initiatives. He or she helps support ALTERthought’s core value of Technology and Innovation through implementation and refinement of leading and emerging technologies for internal as well as client products/solutions. The Engineer/Analyst is a well-rounded professional with excellent interpersonal skills backed by solid engineering expertise.

 

JOB DESCRIPTION

TECHNOLOGY RELATED (70%)

Engineer/Analysts provide a range of technical expertise, as a design and implementation specialist of ALTERthought’’ products and services using C#/.NET, Java/J2EE and a variety of development tools. The ideal candidate has the ability to solve problems quickly and creatively, and is able to work independently to meet aggressive deadlines with a minimal amount of direction from senior team members. Both participating in requirements and design sessions, as well as intensive programming directly from existing specifications will be required. The engineer will code quality implementation of designs using .NET, Java and J2EE technologies, including C#, VB.NET, EJB, JMS, JMX, and JSP while meeting implementation deadlines; problem solve and coordinate with members of a cross-functional team including Project Management, Quality Services and Client Services; maintain implementations as products and services mature; adhere to software development and source control processes; and mentor other team members as appropriate.

 

BUSINESS RELATED (30%)

The Engineer/Analyst will provide analytical and customer contact services in the development of leading edge e-business infrastructure and systems. He or she will aid in analysis of customer User Roles, Processes, and infrastructure needs; Assist in modeling of User/Role Business Information Needs; contribute to current-state Business Process Analysis activities and Contribute to future-state Business Process Design activities.

 

JOB QUALIFICATIONS

1.       Bachelor's degree (preferred) in Computer Science, Electrical Engineering, or Computer Engineering or demonstrable equivalent industry experience

2.       2+ years of Object Oriented server side development required

3.       2+ years of full-lifecycle server software development experience using the following technologies: VB.NET, C#, ASP.NET

4.       Experience with various Microsoft Platforms

5.       Familiarity with relational databases

6.       2+ years experience with Object Oriented Analysis and Design (OOAD) using UML

7.       Experience with XML/XSL, WSDL, and SQL

8.       Ability to handle multiple tasks simultaneously

9.       Demonstrated capacity for learning quickly in a fast-paced environment

10.   Excellent communication skills

11.   Must be able to translate mid-level designs, into quality implementations

12.   Must be an excellent team player with the ability to offer and accept constructive criticism

13.   Must have 2 + years experience with various software development methodologies, preferably the RUP and/or Agile/XP tenets.

14.   Previous consulting experience desired

15.   Experience with Java, J2EE (EJB, JMS, JMX, etc.) highly desired

16.   Affinity and experience with open source tools and frameworks (Struts, Ant, assorted Jakarta tools) is a plus

17.   Experience designing and developing solutions for both Wintel and Unix-based operating systems is required

18.   This position requires a minimum 2 years of IT-related experience with experience in corporate portals, embedded systems, and high-volume transactional systems is a plus. Experience in accelerated development a strong plus. Demonstrated experience utilizing formal process engineering methods to deliver information service and/or software application is required.

 

 

NOTE: We will consider all candidates for this position, but a re-location package may or may not be offered.

 

ABOUT ALTERTHOUGHT:

ALTERthought is a client-first distributed systems consultancy that helps its business partners lead in their fields through technology and commerce innovation. Clients include the Global 2000, esteemed online brands, and leading mid-market companies. Since its inception in 1998, the integrated consulting and product engineering firm has collaborated with its clients to envision, architect, and deliver business results through intelligent technology solutions while developing its own ground-breaking software concepts.  ALTERthought is headquartered in Richmond, Virginia with offices in the National Capital Region.

 

ALTERthought's software engineering and business consulting offerings include: full lifecycle software development, enterprise architectural engineering, mentoring, estimation and budgeting, product planning, short-term executive staffing, project management, business strategy, business process engineering, information technology strategy, open source strategies, and digital security. For more information, visit the company's website at: www.alterthought.com.

 
If you have any questions, please feel to contact Mike:
 
Thanks,
Mike Richardson
Director of Microsoft Technology
ALTERthought
804.513.8131
Databinding 2.0

I have been asked to review the first 6 chapters in an upcoming databinding 2.0 book. 

I read chapter one on Friday and all I can say is Oh my Gosh!  Once again, Microsoft has figured out a way to reduce the amount of code you have to write to get a windows GUI up and running.  Now, for our shop this does not mean to much as we have a framework built already that does most of what 2.0 offers.  Once again, I wish we had this 2+ years ago, oh well. 

I will continue to post what I see\learn and think is cool as I do my review. Many thanks to the author and publisher for asking me to do the review. 

 

 

More Posts