The Technology Aces blog is a consolidation of the personal blog posts from the individuals that help make Technology Aces the truly elite IT professionals our clients have come to recognize and depend upon.

For more information about the individual authors please follow the links to their blog. Links can be found in the post details section of each post or in the sidebar navigation located on the left side of this page.


Notepad++ > Editpad Pro
Written By Eric Polerecky / October 9 12:46 pm

Just a quick note…in this tight economy there is a huge opportunity for open source software to enter the public sector. I’d really like to see little changes like these in the public sector. Expectably when the open source software, IMHO, is better then the commercial software.


One Of Those Moments
Written By Jamey / October 3 6:52 pm

You know, this should mean something.  So I was on the F5 site, trying to find a solution to a problem I’m having, and I’m searching around.  I throw a term into the search box, hit enter, and up pops a list of hits - the last of which, a forum post, looks relevant.  So I start reading it.

I wrote it.  The year before last.  When I was trying to solve the same problem.  How did I end up solving it, you ask?  Good question, and the answer involved me winning an award.

I swear.


Thinking about the difference between frameworks
Written By Eric Polerecky / October 3 12:59 pm


My Dojo Design Pattern
Written By Eric Polerecky / October 3 8:59 am

This is how I take advantage of dojo when developing an application that uses the toolkit.

First, in the past few months most of the applications I developed have has sparse use of JS with one major exception. Each application has an main “application page” where a bulk of the action takes place.

My current project is a large mapping application similar to maps.google.com or maps.live.com. The application instantiates with a large map and a variety of tools that users can use to generate reports based on the underlying map data. There are ancillary pages for help, sitemap, contact, etc that do not require the amount of JS the map interface requires.

Separation

I create multiple JavaScript files, one XXXX.js and the other XXXX-app.js. The app.js file is only included on the application specific pages.

Note: during development I will create separate JavaScript files for major functionally but combine them before moving to production.

Includes

I try to only include the app.js on the application page.

Onload

   1:   
   2:  function init() {
   3:      app_name = new app_name();
   4:      app_name.postCreate();
   5:  }
   6:  dojo.addOnLoad(init);

app_name

dojo.declare is my friend..

   1:  dojo.declare("my_app", null, {
   2:      _date : '',
   3:      schedule_success : 'Scheduled',
   4:      store_dealer : null,
   5:   
   6:      constructor: function() {
   7:      },
   8:      postCreate: function(){
   9:          var page_body = dojo.query('body')[0];
  10:          switch(page_body.id){
  11:              case 'index':
  12:                  this.index.init();
  13:              break
  14:              default:
  15:                  console.log('default');
  16:              break;
  17:          }
  18:      },
  19:      index: {
  20:          init: function(){
  21:              dojo.connect(dojo.byId('dashboard'),'onclick',function(){ dijit.byId('tabs').selectChild('tab_dashboard'); });
  22:              dojo.connect(dojo.byId('export'),'onclick',function(){ dijit.byId('tabs').selectChild('tab_export'); });
  23:          }
  24:      }
  25:  });

My take on Microsoft shipping jQuery
Written By Eric Polerecky / September 29 6:04 am

First, if you have not heard, Microsoft will be shipping jQuery as part of visual studio. And if the swiftness that the .NET team moves I am sure we can see it in a the next SP. Update: Just re-read the article…The jQuery intellisense annotation support will be available as a free web-download in a few weeks…w00t.

jQuery

jQuery is great, its selector engine is by far the simplest and (I think) most powerful component. But, when using jQuery I always seem to be looking for pluggins…widgets…etc.

Microsoft’s Challenge

Even though my current shop uses dojo, which I love too!, I am truly excited by this move. But integrated jQuery is the potential to become another underutilized component in the .NET toolbox. intellisense is great but most DNDD can’t type a lick of JS. Microsoft is going to have to wrap some widgets around this powerful engine.

 

DNDD: Drag and Drop Developer. Yes it does have a negative condensation.


Visual Studio, Wizards, Project Templates and Unsigned DLLS
Written By Eric Polerecky / September 22 11:26 am

If, after you followed all the steps at http://msdn.microsoft.com/en-us/library/ms185301(VS.80).aspx you are getting an error about unsigned DLLs…try adding the DLL to the bin folder of your project…

Just re-code the wizard in C#…I guess there is a reason all the examples are in C#…


Recursive Queries in SQL Server 2005
Written By Mark / September 18 12:34 pm

among other improvements, SQL Server 2005 included a new XML datatype and enhanced XML functions … thus providing another solution for recursive queries …

for example … if i want to get a list of all of the tables in my database with their associated columns …  i might write the following query:

   1:  SELECT
   2:      sys.objects.object_id AS ENTITY_ID
   3:      , sys.objects.type AS ENTITY_TYPE
   4:      , sys.objects.name AS ENTITY_NAME
   5:      , sys.columns.column_id AS COLUMN_ID
   6:      , sys.columns.system_type_id AS COLUMN_TYPE
   7:      , sys.columns.name AS COLUMN_NAME
   8:  FROM sys.objects
   9:  INNER JOIN sys.columns
  10:      ON sys.objects.object_id = sys.columns.object_id
  11:  ORDER BY sys.objects.type, sys.objects.name, sys.columns.column_id

however, if i want to return only as many rows as i have tables i would have to rewrite that query to either use a CTE pivot, a complex case statement, or i could take advantage of the new xml functions and xpath:

   1:  SELECT
   2:      sys.objects.object_id AS ENTITY_ID
   3:      , sys.objects.type AS ENTITY_TYPE
   4:      , sys.objects.name AS ENTITY_NAME
   5:      , CONVERT(
   6:          varchar(max), CONVERT(
   7:              xml, (
   8:                  SELECT
   9:                      CASE
  10:                            WHEN sys.columns.column_id > 1 THEN ','
  11:                            ELSE ''
  12:                          END AS DELIMETER
  13:                      , sys.columns.name AS COLUMN_NAME
  14:                  FROM sys.columns
  15:                  WHERE sys.columns.object_id = sys.objects.object_id
  16:                  ORDER BY sys.columns.column_id
  17:                  FOR XML RAW, ROOT( 'root' ), ELEMENTS XSINIL
  18:              )
  19:          ).query('//row/*/text()')
  20:      ) AS COLUMN_LIST
  21:  FROM sys.objects
  22:  ORDER BY sys.objects.type, sys.objects.name

happy programming!


How to return a more detailed response in your WSDL for web methods with a return type of XmlDocument
Written By Mark / September 18 4:50 am
you’ve develop your .net web service … get everything working just the way you like … and then you notice that auto generated wsdl provides a less then ideal definition for the response … something like:
 
<s:complexType mixed="true">
    <s:sequence>
        <s:any />
    </s:sequence>
</s:complexType>
 
if instead of providing a separate xsd for the response, you would prefer to embed that schema in
the wsdl ... you need to modify your webservice from:
 
   1:  <WebService(Name:="$WEB_SERVICE_NAME$", Description:="$WEB_SERVICE_DESCRIPTION$" _
   2:  , Namespace:="$WEB_SERVICE_NAME_SPACE$")> _
   3:  <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
   4:  <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
   5:  Public Class $WEB_SERVICE_NAME$
   6:      Inherits System.Web.Services.WebService
   7:   
   8:      <WebMethod(MessageName:="$WEB_METHOD_NAME$", Description:="$WEB_METHOD_DESCRIPTION$")> _
   9:      Public Function $WEB_METHOD_NAME$($WEB_METHOD_PARAMETERS$) As XmlDocument
  10:          'TODO: Add logic to return an XmlDocument with the desired response
  11:      End Function
  12:   
  13:  End Class
 
to:
 
   1:  <WebService(Name:="$WEB_SERVICE_NAME$", Description:="$WEB_SERVICE_DESCRIPTION$" _
   2:  , Namespace:="$WEB_SERVICE_NAME_SPACE$")> _
   3:  <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
   4:  <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
   5:  Public Class $WEB_SERVICE_NAME$
   6:      Inherits System.Web.Services.WebService
   7:   
   8:      Private Const METHOD_NAME As String = "$WEB_METHOD_NAME$"
   9:      Private Const NAME_SPACE As String = "$WEB_SERVICE_NAME_SPACE$"
  10:   
  11:      <WebMethod(MessageName:="$WEB_METHOD_NAME$", Description:="$WEB_METHOD_DESCRIPTION$")> _
  12:      Public Function $WEB_METHOD_NAME$($WEB_METHOD_PARAMETERS$) As _$WEB_METHOD_NAME$
  13:          Return New _$WEB_METHOD_NAME$($WEB_METHOD_PARAMETERS$)
  14:      End Function
  15:   
  16:      <XmlSchemaProvider("$SCHEMA_METHOD_NAME$")> _
  17:      <XmlRoot(METHOD_NAME, Namespace:=NAME_SPACE)> _
  18:      Public Class _$WEB_METHOD_NAME$
  19:          Implements IXmlSerializable
  20:   
  21:          Private Const METHOD_NAME As String = "$WEB_METHOD_NAME$"
  22:          Private Const NAME_SPACE As String = "$WEB_SERVICE_NAME_SPACE$"
  23:          Private Const SCHEMA_PATH As String = "$SCHEMA_VIRTUAL_PATH$"
  24:   
  25:          Public Sub New($WEB_METHOD_PARAMETERS$)
  26:          End Sub
  27:   
  28:          Public Sub ReadXml(ByVal reader As System.Xml.XmlReader) _
  29:              Implements System.Xml.Serialization.IXmlSerializable.ReadXml
  30:              Throw New System.NotImplementedException()
  31:          End Sub
  32:   
  33:          Public Sub WriteXml(ByVal writer As System.Xml.XmlWriter) _
  34:              Implements System.Xml.Serialization.IXmlSerializable.WriteXml
  35:              'TODO: Add logic to append "writer" with the desired response
  36:          End Sub
  37:   
  38:          Public Function GetSchema() As System.Xml.Schema.XmlSchema _
  39:              Implements System.Xml.Serialization.IXmlSerializable.GetSchema
  40:              Throw New System.NotImplementedException()
  41:          End Function
  42:   
  43:      Public Shared Function $SCHEMA_METHOD_NAME$(ByVal varXmlSchemaSet As XmlSchemaSet) _
  44:          As XmlQualifiedName
  45:          ' Get the path to the schema file.
  46:          Dim m_str_schema_path As String = HttpContext.Current.Server.MapPath(SCHEMA_PATH)
  47:          ' Retrieve the schema from the file.
  48:          Dim m_obj_XmlSerializer As XmlSerializer = New XmlSerializer(GetType(XmlSchema))
  49:          Dim m_obj_XmlTextReader As XmlTextReader = New XmlTextReader(m_str_schema_path)
  50:          Dim m_obj_XmlSchema As XmlSchema = CType( _
  51:              m_obj_XmlSerializer.Deserialize(m_obj_XmlTextReader), XmlSchema)
  52:          varXmlSchemaSet.XmlResolver = New XmlUrlResolver
  53:          varXmlSchemaSet.Add(m_obj_XmlSchema)
  54:          Return New XmlQualifiedName(METHOD_NAME, NAME_SPACE)
  55:      End Function
  56:   
  57:      End Class
  58:   
  59:  End Class
 
happy programming!

Page 4 of 6« First...«23456»