Posts

Showing posts with the label Web Development

Choosing Dapper over EFCore

Recently I've been introduced the wonder that is Dapper, now understand most of my experience has been with Entity Framework and honestly found it hard to walk away from a framework that I love and been using since the beginning of my career. However for my current role I need to be more team oriented so its whatever gets the job done. This article will serve as a timestamp so that I can look back. So far its been four months using it and I do find myself using Dapper like EF but with more freedom. I have left concern about what I'm mapping to but just that I've mapped correct. Which I look at first in sql for the correct column. I've written more sql compared to what I wrote with EF. I think that says a lot about Dapper but its hard to say since I've also become more comfortable using sql. Overral Dapper is a lot easier to use. Notes Raw Queries in EF

Schema.org: Separate Product or ItemList Products?

This started to be a little be more of a challenge one night more then I thought. The issue was that I need to have position in my list of products. Which were in a ItemList when I used the itemtype in the same div I didn't have the option to add position ; a requirement for ItemListElement. This all came from about because I was simplifying my list of products by just displaying them on a single page with prices. I wanted to put them list however looking back after a long night I could have easily just listed them as separate Product types. So to summarize the issue I wanted to meet all the requirements from Google's Structured Data Tool and didn't think listing them as multiple Products was right and instead did them as ItemList. Not to be confused with ListItem which is a type that can be at the root but also under ItemListElement. Its all very confusing at first glance. The next question I asked...  Is it okay to have more than one Product Example: (this doesn...

Custom Login Validation

One of the many behaviors that I was asked recently to create was to allowing hide/show of the password and warn users that the locked character key is active. Since this solution could get complex and I just wanted to create a quick/simple demo and because of that I'm going to pick jquery. I could late come back and do it in another library but I already have a few ideas what I want to do. Notes: input - Is it standard practice to indicate on the form that Caps Lock is on? - User Experience Stack Exchange html5 - What's the difference between HTML 'hidden' and 'aria-hidden' attributes? - Stack Overflow Examples:  Edit fiddle - JSFiddle Better Passwords #3: Caps-lock Warnings — SitePoint Code Bins : Password masking in jQuery

Orchard 1.10.1 - Seo & Social Module

Most of the work I do for orchard is open source, this is because nothing other than content is property of my employer. Even if open source makes some employers uncomfortable a lot of my work is about success of a given project or the development process flow. In other words is everyone able to achieve what with the development or features created within a given project. That's just my take on things, I'm sure someone will disagree, putting security in a much higher priority. Which I think is a big part of my reason for being open source on the things I could improve unpon. Notes: https://stackoverflow.com/questions/11149157/orchard-getting-the-contents-title-from-the-theme-layout https://stackoverflow.com/questions/11688626/orchard-theme-placement-not-overriding-module-placement https://stackoverflow.com/questions/13000711/add-individual-page-titles-to-html-document-head-in-orchard-cms https://stackoverflow.com/questions/17737509/orchard-cms-custom-theme-every-page-d...

Content Security Policy & Best Practices

Image
This article is mostly on configuration with nginx and maybe a little on IIS. Notes: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors https://csp-evaluator.withgoogle.com https://securityheaders.io/

Avoiding Select Options by Design

Image
This is just a foot note in my career after years of developing websites. You can take it as a rant or a word of caution. So for a lot of reasons, I really don't like the select tag. For starters its buggy, there are many things about it that don't work across browsers or behave differently. I wish it didn't, and instead could replace the css alternative, dropdowns. An example of my experience over the years, where I tried disabling a option, apple's safiri didn't like that. On another project I tried to just style one of the options again I ran into a wall with firefox. I don't know if these issues still exist but its giving me enough reasons to avoid. Notes: Not allowed cursor of a disabled field appears in a select tag https://jsfiddle.net/3sq410wk/1/ https://github.com/twbs/bootstrap/issues/16088 https://github.com/twbs/bootstrap/issues/14528

Theory & Practice of Data Cleaning

Image
   This is a topic that I found very interesting, however I find the industry's best practices to counterintuitive and in opposition of this very idea. In the near future I am making plans to attend multiple online classes pertaining in or around the subject, however I believe very little of it will be put into use professionally. Instead this is more for my own systems and business model. Since I'm limited by my hardware and the services I've created. Data backups need to be precise without question.     An Example of this very issue, on a project sometime ago  I built an application where the clients could upload image to update their profile. Simple enough however the system had no way of knowing if it was the same image or did any kind of file system clean up for images unattached to the profile. This part was left up to another developer, and wasn't a concern for the developer in regards to the sever's hard-drive space. The previ...

Removing the Cloud

Image
I am trying to remember if I've talked about this before in my blog, it's been a while. Mainly because I've been working towards this idea. Rather than building a social network, I've instead moved on to doing the whole cloud myself. Removing Google, Amazon, and Microsoft from my life, I would encourage others but that's wishful thinking. Instead, I'm just doing my own thing. Got me a server and moved all my applications out of the cloud. Of course, some of the stuff I use is hard to move like this blog but for everything else, I'm completely independent.    For a lot of people, this might seem a strange time to do this, with cloud computing becoming cheaper and easier. I see the writing on the wall. The obvious reason, is my competitive business model, with the big three companies. It's becoming more critical for me to move out of the cloud. So even if I wasn't already worried or paranoid as some might call it about my code. I'm already...

Accessibility Designing

One of the standards that I'm adapting on my own with real interest is handling accessibility for all my major applications. I like to think of printing last as a concern. I think the best practice that I've come up with helping me get in the habit is during the initial color design. Since I may or may not be slight color blind and hear way to often my colors are too light or don't match. I think matching part just comes from the fact I don't understand fashion. Which is why I was the same outfit, you can't mess up with khakis. In other words getting the habit is much the same with my applications with a little variety here and there. I'm not going for anything bold just modern, so here are the tools I use. Tools Contrast Ratio: Easily calculate color contrast ratios. Passing WCAG was never this easy! Accessibility Developer Tools - Chrome Web Store just a bit of caution don't solely depend on this, just like the mobile view in chrome

Bugging Out About Code

Its one battle after another battle and not one you can always win. I've watched good ideas die before they even had a chance but even worse bad ideas take over development. Its a difficult thing to watch. I think the most important things on how to approaching this issue comes down to these points. Encouraging & passinate work environment. people who don't understand will try and want to here. Strong co-worker relationship working alone is nice but teams should come together on certain projects or piceces of code. Clear Objective goals If you can't get support from your team/manager then use deadlines to beat the competition.  It gets harder at this point to not just complain about things or talk about my experience. Whic think could give some insight. Instead I'll just follow my last point and and the article with this. Passion is never a negative and there's always another problem to be solve so don't burn yourself out.

Not just Open Source, but Something a little more

For the most difficult parts of my career I have pushed for open source among my peers. The number one benfit being standardized code, a benefit for everyone involved. I've even drawn  a fine line for everyone I'm come across with to make it simple. If a user can see your code they can take it, so why not improve it with the help of others. Let others improve upon it or poke holes in it. I've also pointed out to nay sayers that it is a good idea not to make your code specific to an application's needs. Aboid sensitive information that can get tangled inside your logic. Separate it, mask and encrypt it do whatever you got to do. As for frontend code in the modern world, its like writting a book. Your core will be read by someone. If it's good enough people will repeat it. Which is what you should want, Just like books some of the pages are unnecessary or fill up the book with more context which can tie it down. Its on that idea why I adopted other people's code ...

IIS Cheatsheet

Setting up a website in iis is pretty easy and its where I'm most comfortable doing my professionally work. However with newer frameworks I'm look outside of iis because of the non-window based servers. So this cheatsheet is even better because I'm sure it will be a long time before convince my peers to use linux. Server Error: HTTP Error 500.19 - Internal Server Error ASP.NET IIS Registration Tool (Aspnet_regiis.exe) How to Configure HTTP Access to SQL Server 2008 Analysis Services on IIS7 Reverse Proxy with URL Rewrite v2 and Application Request Routing Security & Users What are all the user accounts for IIS/ASP.NET and how do they differ? Solution iis 7 - IIS7 Permissions Overview - ApplicationPoolIdentity http://msdn.microsoft.com/en-us/library/k6h9cz8h(v=vs.80).aspx ssl - IIS process cannot access file in use - Stack Overflow Side note Installing and Running node.js applications within IIS on Windows Run IIS + ASP.NET on Windows 10 with...

A Dependency of Dependency Inject

Image
    I have voiced my opinion in the past on dependency injection, and even got myself in some stupid conversations with other developers who are little obsessed with this topic. I was first caught off guard because I questioned for my support for angular which I'll come back to in a minute. My first rule for using any tool or technology is to using it for its greatest strength and really use it or not at all. Which is creating tests around my code and creating versions of those dependencies."we need dependency injection for unit testing/scalability".  Neither of these reasons are wrong and I agree them but if you build blindly follow them without reason you miss the point. I one point used Ninject, and was actually stumped on the explanation given. This was because up to that point dependency injection was something I understood how to use but not its method. However I moved pass that point and started making my opinion clear. Show me the tests! The reason I given was sc...

Gcloud Vs. Azure Comparison With Aspnet Core

Image
Since I no longer use both cloud services I thought I would write down out my experiences. This is going to be really quick because its mostly just what I saw with my company site as far as costs and development on each platforms. This note isn't the be all comparison, just a few statements on what I saw and experiences so do your own research and experimenting on each platforms. Tools (Visual Studio 2015) Without a doubt azure is the better choice but I was really surprised how much there was for glcoud. In fact there is even a plugin for to deploy your app. Gcloud even making docker support easy, the only differences  with visual studio was how you deployed to each platform. Which I like that they were not the same but it did take a long time when I deployed to gcloud. The time was about 10-15 mins sometimes and I'm sure the team is working on it but azure is the winner for this. Logs - Glcoud Checking your logs in gcloud is surprisingly easier if you are not ...

Don't Prompt for Permissions without the User's Direct Interaction

Image
For all the applications out there! Stop pushing for permissions and stop probing for information without reason. Regardless of your necessity for a feature a user is the right for not installing or using an app without clear intent. Action from the user are a direct link from the developer to the client for clear reason and intent on why they need permissions. I see this now and again with website using geo-location and never giving a reason on why the need the permissions but sure enough its the first prompt I get on their site...  This why I really like the recent changes with android its a little annoying for coding but the information needed for the user on why you need some information is clear. I always have to fight with project managers on whats initiate and I can be more direct on why I need something than from what you are asking me to do. There is still room for error (security issues) with a client if they still don't trust an application which I always say they can j...

Making my own CMS

    Back in 2012, I started writing out my own idea an cms or what one should look like and how it should interact with its developers. I've looked at other cms projects and even contributed to my favorite one which is orchard. After jump around different technologies though I would still say a mean server application is probably the best choice for productivity and mobility with other technologies. At the end of the day it doesn't matter what the code is I can simply it with javascript. This is my take on a cms and before I start writing any code and I actually have my own set of requirements to achieve. Features Function to wrap and unwrap a components with the container class. Function to make an element a link, plus add new target, and what it points to. A lot like what's in blogger when creating a post. reorder the records in a table and other permanently actions for simpler code. embed static content from the backend into static html, because somethings d...

Top-Down Development

Image
    If you ask me what my development style is like? I would have to describe it as a form of top-down view with a model view approach. I've been describing my approach to build web application this way for a few years. Every now and then I encountered a developers who will agree with this approach. I guess you can just take the definition from wiki page but really I have my own way of marketing it.     "Throw everything away thing and get ready to start fresh. That's just how it is with every new javascript framework and I think it’s safe to say if it not middle-tier or backend code get ready to rebuild it. This is actually an awesome thing and you need to believe it because forcing development to the backend or middle tier every time something new comes along isn't realistic. Besides why not have the biggest impact on an application's lifecycle with the least amount of work!?"     This is how I marketed my approach it probably could use some work fo...

The Sandbox Methodology

Image
    "Sandbox Methodology" is a term I like to use to describe environments that have zero rules in place against the quick and the dirty practices when it comes to designing an application or implementing one. The term comes from of course sandbox and what most developers are used to with development practices. In a sandbox you have a place where you can experiment with all your work before it faces the harsh world of usability. However in reality, this environment is miss used and becomes a playground for project managers or basically anyone in management to see how far you are in the implementation. Or it’s used to build out requirements, "let the developer figure out what I want to be build playground". Long name, terrible results… You might be familiar with other methodologies but this is one you will definitely regret using.     It could be said this approach is more of a waterfall methodology and employers will call it Agile. Chances are it’s a ho...

Making Internal Web Apps into Software Apps

Image
    When you're building an internal web app I think about some of the business solutions I  can create inside a company that might shrink the workload for my co-workers. Its awesome to see this happen but it only works where it makes sense, so below is some of these features I've easily used by general users. Hotkeys - are power ways to help your users get what they want faster, and overlooked in my opinion. Since users are in house users can make requests on what the would like to see. I don't like use the excuse that your users are "dumb" especially in house. This is an argument I hear a lot and it bugs me. For example if the app looks like a excel sheet one would think it behaves like one, so include those hotkey! Below is a hotkey I look to use a lot with my users on a search page looking to you the typeahead feature I created. Instead I popup with the search automatically and return the results since it a common action. Another good example to look at is ...

Mobile Design for Multi-Navigation Systems

      So awhile back I started a project that would extend or solidify the bootstrap sidenav. This is because I didn't think the grid system was qualified for such a major role. Bootstrap works great for mobile design up until you start talking about a different navigations than what the guidelines recommend. I'm still working on this project but for I now have hopes of finishing it which you can find on github under the  name bootstrap-sidenav-component. Much of my effect in the last couple years has been to extended bootstrap not recreate or overlap it, which is what this project will do as well hence why I call it a component of bootstrap. Project: https://github.com/fassetar/bootstrap-sidenav-component

Popular posts from this blog

Aspetcore: NLog with Postgresql

Mongodb Cheatsheet

Installing Windows on Acer chromebook 15 cb3-532