archive-be.com » BE » B » BENNYMICHIELSEN.BE

Total: 348

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Software Development – Page 2 – Benny Michielsen
    default model binder will use all the registered value providers to create a match Since we ve registered our IfModifiedValuesProviderFactory in the WebAPI configuration it will be automatically picked up If a user of our API uses a query string to pass along the ifModifiedSince value that will keep working as well If we add a CookieValueProvider in the future we will only have to implement the value provider and add it to the configuration of our application We will not have to inspect every method to see where we should add them explicitly Best of both worlds There s a nice poster of the lifecycle of an HttpRequestMessage on MSDN which includes an illustration on how model binding works Author BennyM Posted on 17 11 2013 17 11 2013 Categories Software Development Tags binding WebAPI 2 Comments on Model binding with Headers in ASP NET WebAPI Exposing iCal data in WebAPI With ASP NET Web API it s now easier than ever to create lightweight HTTP services in NET Out of the box the ApiControllers you implement can read json xml and form encoded values from the HTTP request but also write xml and json to the HTTP response HTTP has the concept of content negotiation This means that when a client requests a resource it can tell the server that it wants the result in a specific format Below you can see an HTTP request that requests json And in the HTTP response the data is formatted accordingly If the client requests the response to be formatted as xml Then the result will be returned as xml This mechanism can be extended to support different kind of formatters to read from or write to the body of a request or response Let s say we want to support an additional format that can write appointments in iCal format To create a custom formatter you inherit from BufferedMediaTypeFormatter or MediaTypeFormatter For this example I chose the first one The code is pretty straightforward and represents a very simple implementation of the iCal standard The only WebAPI specific code can be found in the constructor There we add the mapping for the headers we want the formatter to be invoked for After we add the formatter to the configuration object it will be invoked automatically whenever a client says it accepts text iCal The current setup works fine in Fiddler or when you use a custom client JavaScript or HttpClient But for a true end to end sample I want to use Outlook to connect to my appointment service Unfortunately Outlook does not send an accept header with text iCal when it requests resources from an internet calendar So we need to work around this problem Here another extensibility point of ASP NET Web API comes into play MessageHandlers MessageHandlers allow you to plug into the request processing pipeline on its lowest level You can inspect the request and response message and make changes In this case we can inspect the user agent that is added to the request when Outlook contacts our service When we find a match we will add an additional header to the incoming request We also add this message handler to the configuration object We now have everything in place to add an internet calendar in Outlook and view the appointments in our WebAPI Open Outlook Go to Calendar In the ribbon click on Open Calendar and then From Internet Fill in the url of the AppointmentService in WebAPI i e http localhost 58250 api appointments Click Ok You now have one AppointmentController serving json xml and iCal The complete source can be downloaded here Author BennyM Posted on 11 11 2013 Categories Software Development Tags iCal outlook WebAPI 2 Comments on Exposing iCal data in WebAPI Update MVC4 project to MVC5 within Visual Studio If you are using VS2012 and start a new ASP NET MVC4 project you will be greeted by an enormous list of packages which can be updated when clicking through to the NuGet package managers With the new release of Visual Studio 2013 MVC5 WebAPI2 a lot of new binaries are ready to be used in your application So updating the packages in Visual Studio should get you going After clicking yes and I agree several times though you will receive this error message If you now close the NuGet package manager and then open it again only one package needs to be updated at the moment ANTLRv3 So click update once more If you now start the application instead of receiving a nice MVC start screen you will run into a yellow screen of death We are almost there Navigate to the Web config inside of the Views directory and change all references from MVC 4 0 0 0 to 5 0 0 0 and the Razor version from 2 0 0 0 to 3 0 0 0 I ve included the changes in this gist You are now ready to go UPDATE Ran into t his MSDN article which shows you the steps I mentioned and more Author BennyM Posted on 02 11 2013 11 11 2013 Categories Software Development Tags mvc visual studio Leave a comment on Update MVC4 project to MVC5 within Visual Studio MetroMvc with dotless I ran into the MetroMvc GitHub project a week ago It contains stylesheets to give your web application a Metro look The only downside being it uses a 3rd party tool to convert the less files into css In order to address this issue I ve forked the project and made the necessary changes to make it work with the dotless NuGet package You can get it here Author BennyM Posted on 17 08 2012 17 08 2012 Categories Software Development Leave a comment on MetroMvc with dotless SignalR Ninject and WebActivator sitting in a tree On a project I ve been working on I ve been having some issues with combining these technologies We already had an MVC

    Original URL path: http://blog.bennymichielsen.be/category/softwaredevelopment/page/2/ (2016-04-29)
    Open archived version from archive


  • Software Development – Page 8 – Benny Michielsen
    the book and can say that it s a very pleasant one to read you can get it here I ve also adjusted my view on Objective C and Cocoa while at first it seemed a bit rough and basic I m beginning to see that it s full featured language and framework with very advanced capabilities which don t require a lot of code Though the real challenge will be to build a real application after I ve completed the book I m still staring at the screen sometimes wondering why I got three errors when there s only a missing Oh yeah thanks Lemmy for giving me a tilde over IM I haven t found that key on the keyboard yet p RaiseMan Chapter 13 zip 86 38 kb RaiseMan Chapter 14 zip 87 29 kb RaiseMan Chapter 15 zip 87 67 kb RaiseMan Chapter 16 zip 111 13 kb Author BennyM Posted on 04 06 2008 Categories Software Development Tags book c cocoa development objective c programming 2 Comments on Cocoa Programming for Mac OS X Ch 13 16 Cocoa Programming for Mac OS X Ch 9 12 Read part one here part two here and get the book here The plot thickens Chapter 9 NSUndoManager For those wondering what that NS is doing everywhere it comes from NeXTSTEP more information about it here This chapter is all about adding undo redo capabilities to your application and maybe it s because the current sample application is well a sample but it s rather easy to add this capabilities to your program Also you get it integrated with the menu bar at no extra cost the window shows that there are changes and the undo and redo buttons come to live The underlying mechanism relies heavy upon Key Value coding which was discussed in chapter 7 again demonstrating it power void insertObject Person p inEmployeesAtIndex int index NSLog adding to p employees NSUndoManager undo self undoManager undo prepareWithInvocationTarget self removeObjectFromEmployeesAtIndex index if undo isUndoing undo setActionName Insert Person self startObservingPerson p employees insertObject p atIndex index Chapter 10 Archiving The sample application now tracks changes and when you try to close an edited window it asks if it should save its changes So the logical next chapter is about adding this capability In this chapter we learn that the notion of an interface in Net actually also exists in Objective C but it s called a protocol and unlike Net and Java you can have optional methods in a protocol so any method marked optional does not need to be implemented Archiving is coupled with the NSCoding protocol and the abstract NSCoder class most of the time you ll be dealing with the abstracted class which hides the underlying mechanism Implementing this can be compared to the implementation in Net Though it requires less code to write since your object graph is stored automatically in a file You can configure the extension and the icon from within XCode it was also nice to see that OS X had automatically associated the extension with my application import Foundation Foundation h interface Person NSObject NSCoding NSString personName float expectedRaise property readwrite copy NSString personName property readwrite float expectedRaise end import Person h implementation Person id init super init expectedRaise 5 0 personName New Person return self void dealloc personName release super dealloc synthesize personName synthesize expectedRaise void setNilValueForKey NSString key if key isEqual expectedRaise self setExpectedRaise 0 0 else super setNilValueForKey key void encodeWithCoder NSCoder coder coder encodeObject personName forKey personName coder encodeFloat expectedRaise forKey expectedRaise id initWithCoder NSCoder coder super init personName coder decodeObjectForKey personName retain expectedRaise coder decodeFloatForKey expectedRaise return self end Chapter 11 Basic Core Data You thought it was good well it just gets better All the code we still had to write to add undo redo change tracking and archiving to our application can be done without writing any line as illustrated with this chapter Again we see the power of Key Value coding Chapter 12 Nib Files and NSWindowController Nib files contain the state of the window designed with interface builder this chapter tells you how you can postpone loading a window panel to save memory and resources It also how you can load classes this includes Windows custom classes etc by their name Much like the Activator in Net IBAction showAboutPanel id sender BOOL successful NSBundle loadNibNamed About owner self if successful NSLog Loaded nib from NSBundle else NSLog Unable to load nib RaiseMan Chapter 9 zip 72 21 kb RaiseMan Chapter 10 zip 74 18 kb CarLot Chapter 11 zip 43 54 kb RaiseMan Chapter 12 zip 85 23 kb Author BennyM Posted on 02 06 2008 Categories Software Development Tags book c cocoa development objective c programming Leave a comment on Cocoa Programming for Mac OS X Ch 9 12 Cocoa Programming for Mac OS X Ch 6 8 View Chapters 1 5 here get the book here The title of chapter 6 Helper Objects did not sound good Whenever I find classes with the words Helper or Util in their name this usually indicates a code smell and most of time the underlying problem is a leaky domain model Turns out something completely different is the subject of this chapter delegates They can be compared with delegates in Net though they are being used in a different way I ll illustrate with a sample The TableView UI component deals with displaying data like a table compare this with the Net grid What it displays however is not part of his responsibility this behaviour can be added though by using delegates The tableView has a delegate member which you can set if that object implements methods which map to delegate methods of the tableView they will be called otherwise they won t This means that you don t need to implement everything just what you need I think in Net this behaviour would be implemented by using interfaces So if you

    Original URL path: http://blog.bennymichielsen.be/category/softwaredevelopment/page/8/ (2016-04-29)
    Open archived version from archive

  • MVC3 and MonoDevelop – Benny Michielsen
    then copied these assemblies to a local folder since they are not part of the Mono framework System Web Helpers System Web Mvc System Web Razor System Web WebPages Deployment System Web WebPages System Web WebPages Razor Fix the references in your project hit run and you re good to go Unfortunately you re not getting any intellisense yet Author BennyM Posted on 14 05 2011 14 05 2011 Categories Software Development Tags mono Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous post Book review Essential LINQ Next Next post Entity Framework 4 1 Material Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock The Morning Brew 2052 on Getting up and running with Mono and Raspberry Pi 3 bhldev on Exposing iCal data in WebAPI Archives March 2016 February 2016 August 2015 July 2015 June 2015 May 2015 April 2015 March 2014 November 2013 August 2012 July 2012 January 2012

    Original URL path: http://blog.bennymichielsen.be/2011/05/14/mvc3-and-monodevelop/ (2016-04-29)
    Open archived version from archive

  • Mono 2.4 and MonoDevelop 2.0 on OSX – Benny Michielsen
    a lot of the c language enhancements as well as new NET features have made it into the platform Including automatic properties lambdas etc Linq is said to be supported as well but I was unable to write even a simple query I never got the select statement to work Could be me though What I did find interesting was how you can create native looking applications for almost every platform while using the same Mono core of your application I really want to try that out On the Mono site you get linked to Cocoa for OSX but that project seems to be rather silent though a user made a recent contribution I did like the way on how you could use the existing development tools available xCode and Interface builder so you would not need to learn another application There s a video demonstrating the approach A more active project with the latest version released in March is Monobjc which seems to have the same goal as Cocoa I ll probably try this one out first Anyone with some Objective C and Cocoa experience will recognize the way it works in this tutorial Though at first glance you can t use xCode to write your c Oh yeah last time I checked you can use Spring Net with Mono too Author BennyM Posted on 12 04 2009 Categories Software Development Tags cocoa mono MonoDevelop objective c Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous post This week on my screen 6 Next Next post Updated to BE 1 5 Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS

    Original URL path: http://blog.bennymichielsen.be/2009/04/12/mono-2-4-and-monodevelop-2-0-on-osx/ (2016-04-29)
    Open archived version from archive

  • cocoa – Benny Michielsen
    other windows will receive events until it is closed or as a sheet meaning it s specific to a certain form Chapter 16 Localization Again this can be compared to the work you need to do in Visual Studio and Net the main difference here is that you can pretty easy extract the strings that need to be localized This is probably possible in the Net world too with some sort of plugin but it s always nice to see it build in like the notifications I m now half way through the book and can say that it s a very pleasant one to read you can get it here I ve also adjusted my view on Objective C and Cocoa while at first it seemed a bit rough and basic I m beginning to see that it s full featured language and framework with very advanced capabilities which don t require a lot of code Though the real challenge will be to build a real application after I ve completed the book I m still staring at the screen sometimes wondering why I got three errors when there s only a missing Oh yeah thanks Lemmy for giving me a tilde over IM I haven t found that key on the keyboard yet p RaiseMan Chapter 13 zip 86 38 kb RaiseMan Chapter 14 zip 87 29 kb RaiseMan Chapter 15 zip 87 67 kb RaiseMan Chapter 16 zip 111 13 kb Author BennyM Posted on 04 06 2008 Categories Software Development Tags book c cocoa development objective c programming 2 Comments on Cocoa Programming for Mac OS X Ch 13 16 Cocoa Programming for Mac OS X Ch 9 12 Read part one here part two here and get the book here The plot thickens Chapter 9 NSUndoManager For those wondering what that NS is doing everywhere it comes from NeXTSTEP more information about it here This chapter is all about adding undo redo capabilities to your application and maybe it s because the current sample application is well a sample but it s rather easy to add this capabilities to your program Also you get it integrated with the menu bar at no extra cost the window shows that there are changes and the undo and redo buttons come to live The underlying mechanism relies heavy upon Key Value coding which was discussed in chapter 7 again demonstrating it power void insertObject Person p inEmployeesAtIndex int index NSLog adding to p employees NSUndoManager undo self undoManager undo prepareWithInvocationTarget self removeObjectFromEmployeesAtIndex index if undo isUndoing undo setActionName Insert Person self startObservingPerson p employees insertObject p atIndex index Chapter 10 Archiving The sample application now tracks changes and when you try to close an edited window it asks if it should save its changes So the logical next chapter is about adding this capability In this chapter we learn that the notion of an interface in Net actually also exists in Objective C but it s called a protocol and unlike Net and Java you can have optional methods in a protocol so any method marked optional does not need to be implemented Archiving is coupled with the NSCoding protocol and the abstract NSCoder class most of the time you ll be dealing with the abstracted class which hides the underlying mechanism Implementing this can be compared to the implementation in Net Though it requires less code to write since your object graph is stored automatically in a file You can configure the extension and the icon from within XCode it was also nice to see that OS X had automatically associated the extension with my application import Foundation Foundation h interface Person NSObject NSCoding NSString personName float expectedRaise property readwrite copy NSString personName property readwrite float expectedRaise end import Person h implementation Person id init super init expectedRaise 5 0 personName New Person return self void dealloc personName release super dealloc synthesize personName synthesize expectedRaise void setNilValueForKey NSString key if key isEqual expectedRaise self setExpectedRaise 0 0 else super setNilValueForKey key void encodeWithCoder NSCoder coder coder encodeObject personName forKey personName coder encodeFloat expectedRaise forKey expectedRaise id initWithCoder NSCoder coder super init personName coder decodeObjectForKey personName retain expectedRaise coder decodeFloatForKey expectedRaise return self end Chapter 11 Basic Core Data You thought it was good well it just gets better All the code we still had to write to add undo redo change tracking and archiving to our application can be done without writing any line as illustrated with this chapter Again we see the power of Key Value coding Chapter 12 Nib Files and NSWindowController Nib files contain the state of the window designed with interface builder this chapter tells you how you can postpone loading a window panel to save memory and resources It also how you can load classes this includes Windows custom classes etc by their name Much like the Activator in Net IBAction showAboutPanel id sender BOOL successful NSBundle loadNibNamed About owner self if successful NSLog Loaded nib from NSBundle else NSLog Unable to load nib RaiseMan Chapter 9 zip 72 21 kb RaiseMan Chapter 10 zip 74 18 kb CarLot Chapter 11 zip 43 54 kb RaiseMan Chapter 12 zip 85 23 kb Author BennyM Posted on 02 06 2008 Categories Software Development Tags book c cocoa development objective c programming Leave a comment on Cocoa Programming for Mac OS X Ch 9 12 Cocoa Programming for Mac OS X Ch 6 8 View Chapters 1 5 here get the book here The title of chapter 6 Helper Objects did not sound good Whenever I find classes with the words Helper or Util in their name this usually indicates a code smell and most of time the underlying problem is a leaky domain model Turns out something completely different is the subject of this chapter delegates They can be compared with delegates in Net though they are being used in a different way I ll illustrate with a sample The TableView UI component

    Original URL path: http://blog.bennymichielsen.be/tag/cocoa/ (2016-04-29)
    Open archived version from archive

  • MonoDevelop – Benny Michielsen
    the c language enhancements as well as new NET features have made it into the platform Including automatic properties lambdas etc Linq is said to be supported as well but I was unable to write even a simple query I never got the select statement to work Could be me though What I did find interesting was how you can create native looking applications for almost every platform while using the same Mono core of your application I really want to try that out On the Mono site you get linked to Cocoa for OSX but that project seems to be rather silent though a user made a recent contribution I did like the way on how you could use the existing development tools available xCode and Interface builder so you would not need to learn another application There s a video demonstrating the approach A more active project with the latest version released in March is Monobjc which seems to have the same goal as Cocoa I ll probably try this one out first Anyone with some Objective C and Cocoa experience will recognize the way it works in this tutorial Though at first glance you can t use xCode to write your c Oh yeah last time I checked you can use Spring Net with Mono too Author BennyM Posted on 12 04 2009 Categories Software Development Tags cocoa mono MonoDevelop objective c Leave a comment on Mono 2 4 and MonoDevelop 2 0 on OSX Monodevelop on Leopard Since last week I m the proud owner of a MacBook and I m exploring this new world I want to try out Mono with Monodevelop since I m a net developer but their Mac support seems to be lacking I m using the latest version of Mono 1

    Original URL path: http://blog.bennymichielsen.be/tag/monodevelop/ (2016-04-29)
    Open archived version from archive

  • objective-c – Benny Michielsen
    do in Visual Studio and Net the main difference here is that you can pretty easy extract the strings that need to be localized This is probably possible in the Net world too with some sort of plugin but it s always nice to see it build in like the notifications I m now half way through the book and can say that it s a very pleasant one to read you can get it here I ve also adjusted my view on Objective C and Cocoa while at first it seemed a bit rough and basic I m beginning to see that it s full featured language and framework with very advanced capabilities which don t require a lot of code Though the real challenge will be to build a real application after I ve completed the book I m still staring at the screen sometimes wondering why I got three errors when there s only a missing Oh yeah thanks Lemmy for giving me a tilde over IM I haven t found that key on the keyboard yet p RaiseMan Chapter 13 zip 86 38 kb RaiseMan Chapter 14 zip 87 29 kb RaiseMan Chapter 15 zip 87 67 kb RaiseMan Chapter 16 zip 111 13 kb Author BennyM Posted on 04 06 2008 Categories Software Development Tags book c cocoa development objective c programming 2 Comments on Cocoa Programming for Mac OS X Ch 13 16 Cocoa Programming for Mac OS X Ch 9 12 Read part one here part two here and get the book here The plot thickens Chapter 9 NSUndoManager For those wondering what that NS is doing everywhere it comes from NeXTSTEP more information about it here This chapter is all about adding undo redo capabilities to your application and maybe it s because the current sample application is well a sample but it s rather easy to add this capabilities to your program Also you get it integrated with the menu bar at no extra cost the window shows that there are changes and the undo and redo buttons come to live The underlying mechanism relies heavy upon Key Value coding which was discussed in chapter 7 again demonstrating it power void insertObject Person p inEmployeesAtIndex int index NSLog adding to p employees NSUndoManager undo self undoManager undo prepareWithInvocationTarget self removeObjectFromEmployeesAtIndex index if undo isUndoing undo setActionName Insert Person self startObservingPerson p employees insertObject p atIndex index Chapter 10 Archiving The sample application now tracks changes and when you try to close an edited window it asks if it should save its changes So the logical next chapter is about adding this capability In this chapter we learn that the notion of an interface in Net actually also exists in Objective C but it s called a protocol and unlike Net and Java you can have optional methods in a protocol so any method marked optional does not need to be implemented Archiving is coupled with the NSCoding protocol and the abstract NSCoder class most of the time you ll be dealing with the abstracted class which hides the underlying mechanism Implementing this can be compared to the implementation in Net Though it requires less code to write since your object graph is stored automatically in a file You can configure the extension and the icon from within XCode it was also nice to see that OS X had automatically associated the extension with my application import Foundation Foundation h interface Person NSObject NSCoding NSString personName float expectedRaise property readwrite copy NSString personName property readwrite float expectedRaise end import Person h implementation Person id init super init expectedRaise 5 0 personName New Person return self void dealloc personName release super dealloc synthesize personName synthesize expectedRaise void setNilValueForKey NSString key if key isEqual expectedRaise self setExpectedRaise 0 0 else super setNilValueForKey key void encodeWithCoder NSCoder coder coder encodeObject personName forKey personName coder encodeFloat expectedRaise forKey expectedRaise id initWithCoder NSCoder coder super init personName coder decodeObjectForKey personName retain expectedRaise coder decodeFloatForKey expectedRaise return self end Chapter 11 Basic Core Data You thought it was good well it just gets better All the code we still had to write to add undo redo change tracking and archiving to our application can be done without writing any line as illustrated with this chapter Again we see the power of Key Value coding Chapter 12 Nib Files and NSWindowController Nib files contain the state of the window designed with interface builder this chapter tells you how you can postpone loading a window panel to save memory and resources It also how you can load classes this includes Windows custom classes etc by their name Much like the Activator in Net IBAction showAboutPanel id sender BOOL successful NSBundle loadNibNamed About owner self if successful NSLog Loaded nib from NSBundle else NSLog Unable to load nib RaiseMan Chapter 9 zip 72 21 kb RaiseMan Chapter 10 zip 74 18 kb CarLot Chapter 11 zip 43 54 kb RaiseMan Chapter 12 zip 85 23 kb Author BennyM Posted on 02 06 2008 Categories Software Development Tags book c cocoa development objective c programming Leave a comment on Cocoa Programming for Mac OS X Ch 9 12 Cocoa Programming for Mac OS X Ch 6 8 View Chapters 1 5 here get the book here The title of chapter 6 Helper Objects did not sound good Whenever I find classes with the words Helper or Util in their name this usually indicates a code smell and most of time the underlying problem is a leaky domain model Turns out something completely different is the subject of this chapter delegates They can be compared with delegates in Net though they are being used in a different way I ll illustrate with a sample The TableView UI component deals with displaying data like a table compare this with the Net grid What it displays however is not part of his responsibility this behaviour can be added though by using delegates The tableView has

    Original URL path: http://blog.bennymichielsen.be/tag/objective-c/ (2016-04-29)
    Open archived version from archive

  • Monodevelop on Leopard – Benny Michielsen
    to add any projects to a solution The documentation states I need to right click control click on a Mac right the solution and then select Add new Project but I don t get any context menu I m guessing it s my own fault and not theirs Where s my menu Edit after going through the MD bug tracking pages I found several issues related to this behaviour bug 359734 and bug 367055 Author BennyM Posted on 28 04 2008 Categories Computer Tags click menu mono MonoDevelop Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous post HTPC high definition for the masses Next Next post Using the MacBook Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock The Morning Brew 2052 on Getting up and running with Mono and Raspberry Pi 3 bhldev on Exposing iCal data in WebAPI Archives March 2016 February 2016 August 2015 July 2015 June 2015

    Original URL path: http://blog.bennymichielsen.be/2008/04/28/monodevelop-on-leopard/ (2016-04-29)
    Open archived version from archive



  •