Posts

Showing posts from August, 2014

Compiling Bootstrap LESS using Asp.net MVC and Web Essentials

Image
    My goal is to work with others in whatever framework they choose but I'm constantly update css styles with a pre-processor so that I do not have to work with the css libraries directly. Download the   Web Essentials  and the Bootstrap less nuget package. Get this nuget package! I see it all the time where developers install the wrong packages, sometimes theres ones with similar names and you just not sure what the differences are. So just so we're clear its the first package with the bootstrap .less in the name. Just search for bootstrap less as two seperate keywords, should be no problem. Solution For this solution did  not have to change thing with my setup or move around files on the directory once I got things up and running. I even made it easier for colleagues to come into web applications without any problems so in case they are new to bootstrap they can simple ignore the less files. Now what I did was create  separate  bootstrap.less file and did some reg

A Thought on Server Side and Client Side Models

   The truth is if you want to take server side models for example in Asp.net Mvc directly to a client side mvc framework's enviroment the common approach is via ajax. What has me troubled about this approach is that in some cases we already know the information that will be passed from server side to client before the call based on the request in some cases. So why do we make clients call this ajax? It's simply because we don't have enough ways to bridge the two technologies. Now just to be clear I'm not talking about third party api's or in any extreme case where the data is so dynamic that it is dependent on the front-end. What I am talking about is in cases where the data is in within the web application and we know what is needed by the page request. In case I haven't made myself clear (probably not) here is an example of what I mean. Example       I'm going to use an example from a Asp.net Mvc perspective just because that is what I'm familar w

Ng-grid: Export Feature

   From a front-end standpoint it's easy to use ng-grid since a lot of the variables already exist. What I did in my implementation was leverage as much of ng-grid as possible before creating my own functions. Displayed fields in the grid that are checked by default are also checked in the export dialog. This feature was written up to handle hidden fields in the grid as well and gives the user the option to select or deselect all the available fields to export. However this example assumes that "name" field is a key on the server side and if passed to the server could give you whatever is in the database. So if you were looking to attach this to a more meaningful system you would pass just the key and fields to the server in order to get your results.   Solution: <!--Html part--> <button type="button" class="btn btn-success pull-right" data-toggle="modal" data-target="#exportModal">Export to Data</button> <

Editing Blogger Post on Github, Rough Draft

Image
    This was an idea that came to me when I was looking at  haacked's blog  (awesome blog by the way!)  which is mostly built with  jekyll  site since he uses github to host his site. I'm not really a fan of jekyll, I won't lie never played around with it . If github hosted a  web server  in nodeJs I probably would just move my blog in a  heartbeat over to github completely  but for now I like having it on blogger.      Now I haven't implemented this but here is a rough idea what I would do to achieve it. I think the image is pretty detailed but to sum it up I would IFTTT to notify my application when a new post is  available and then create a commit to github and allow people to fork the blog's repository and then create edits. I've even started the repo here ...  Research Blogger JSON API: Using the API - Blogger — Google Developers http://jekyllrb.com/docs/posts/  - If I ever need to move my blog to github it would be good to know. Comments |

Project: DuckSauce Notes Part III

    It's been a couple of weeks since I've released an update on this project, but much of it is due to the fact that I have completely reimplemented my approach. I now have a better understanding where browserify will come into place and where grunt will come into place. Most importantly I understand the v8 javascript engine which runs underneath the chrome browser; this is a major win for me. Here is my  previous article ... Day 1 Day 7: GruntJS LiveReload--Take Productivity to the Next Level | Openshift Blog I basically want to remove the need for LiveReload. Moving from CodeKit to Grunt Watch + LiveReload for Real-time JavaScript/LESS/SASS Compilation - Justin Klemm Another great example what LiveReload can do. Chrome Apps Office Hours: NodeJS in Chrome packaged apps - YouTube Example with Browserify but you can't using it against Grunt. Iced Blog - node js in chrome http://stackoverflow.com/questions/16788731/grunt-watch-multiple-files-compile-only

Unity: Notes for My Next Game IIII

Image
    This summer is going by fast however I think I got a lot done and I'm really surprised how quickly things are coming together. Like I said in my last article , I've played with Blender before. My goal for this week was really simple. Create a model, give it some animations and control it in unity . First Attempt (very basic...) Resources https://www.youtube.com/watch?v=J1mExXURsWk https://www.youtube.com/watch?v=FNntp5OOA30 http://blender.stackexchange.com/questions/3690/toggle-wireframe-mode-with-hotkey Cntrl-R - create more, "loop cut"? -  2.6/Manual/Modeling/Meshes/Editing/Subdividing/Loop Subdivide  BLENDER Tutorial - EASY Fully poseable hand in 10 minutes! - YouTube - audio is very low but very useful video Importing Blender into Blender After I imported my object I noticed on the back side one of the fingers was missing... Wasn't sure if this was something I did or a setting. Update  Solution:  One side of an object appears normal but the

Base64 images in Web Applications

    Web essentials has this really cool feature that allows you to convert your images to base64 on the fly which at the time it was a very new concept to me. I had no idea that you could use a string of data in place of the url but right from the start I got the impression that it wasn't very efficient. Not only that but I was pretty sure that anything less than IE10 was going to cry about it. My experience and gut were right, now IE support aside this is still a really cool ability to have but I did some research still to see if it really wasn't efficient. Which also appeared to be true, but I didn't test that myself. Still the reason behind why I might use this feature would be when you have a small web application and for whatever reason you need all the resources  to be inline with the html. A better scenario is if the whole html page was being placed in a xml as cdata. I've actually had to do this before with an Google Hangout application. Resources php - Wh

CMS Integration with Existing Sites in IIS

Image
    For this setup you will need IIS 8.0 or higher because of the URL rewrites module. In my process of figuring this out I ran into some pretty funny infinite loops so watch out those if you're site is taking a long time to load. Most of this process is just using the URL rewrites, and what we are trying to do is make our application the homepage and have the CMS rest in the back making all links needed point to it. We could easily reverse this setup and make the CMS the homepage, or we could pull data from the CMS into our web application. Making some kind of widget built based on the CMS, which is easy to do if your CMS has an API  service already built out.    In this example I make the CMS seat behind my web application and routed the CMS's to a subdomain. There is also a legacy site which will seat next to the CMS on its own sub subdomain. If the url's within each application are relative then there is no need to modify them for this setup. Example of URL

Html: Download Files and Respond

    For a particular web application a user has selected to download a file but since the files is extremely large it will take sometime for it to return. In the process of write out this task, I knew already how I wanted the process to appear. However I didn't give it too much thought as to how I would implement it since I have multiple possible ways to approach it.     To make a long story short I ended up doing what I've seen before with Google Drive and just made a button that would direct to a new tab and return the content type in the headers. What this does is allow the user to see a response without impacting the whole page. Note that I used a button instead of a link. Inside the  button and create javascript function for the  onclick attribute. Inside that function I simply called  window.open . There is two reason why I didn't use just a link, the first is I had no clue what the link would point to until the user was done making a selection. The second was beca

CSS: 0px or 0?

    I've used zero's in my styles before but I think it has been an habit of mine to "px". In the end, and it was when I use checking out the features on Web Essentials  that I noticed this helpful hint. I think the benefits of choosing one over the over are very small. Something similar to choosing a comma or a double comma in javascript but I find myself in a grey area when it's one habit vs another. So what I've started to do is just use zero's instead. Not a very difficult habit to change but I need to be consistent so it has been more of a pain to go through all my projects and edit all the styles. Reasons Behind my Choice Saves space using single character. The definition is universal in all browser (zero is zero). There are a lot more reasons in the links below but these are the two the easiest to remember. Also just because I like to use bootstrap with a lot of my projects, I noticed that bootstrap already does this so that is another re

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql