Author Archives: admin

About admin

Been in IT industry for more than 10 years now, I've done lot of web development, content management system, mobile app, etc...Visit http://brandontruong.info for more details

Web developer @Pickles Auctions

Key Duties:

  • Upgrade App from Angularjs 2 to Angularjs 4.
  • Implemented hero search component using react + redux.
  • Implemented Webpack features especially tree shaking.

Technologies used:

  • Angularjs 4
  • Angularjs 2
  • Typescript
  • React
  • Redux
  • Webpack
  • Nodejs
  • Paint.Net
  • CSS3
  • HTML5
  • jQuery

Tree shaking with webpack settings

Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. Its such a great tool for web development. One of the great feature it offers is the ability to tree shaking the javascript and CSS bundles with the right plugins.

For js tree shaking. I have used UglifyJsPlugin. Below is how I got the plugin works in my webpack.config.js file.

For css tree shaking. I have used PurifyCSSPlugin. Below is how I got the plugin works in my webpack.config.js file.

In order for PurifyCSSPlugin, make sure the above code goes after ExtractTextPlugin. See below

Another nice feature that I love to use in my webpack config is the ability to control how chunks should be sorted before they are included to the html via chunksSortMode option of html-webpack-plugin

To control the order of the chunks, I name them with the number at the front of that name. For example

Any feedback, please leave your comments and I’ll get back to you ASAP.

Portfolio Press gallery introduction text

Portfolio Press has always been one of my favorite free themes in term of showcasing any work portfolio or just normal gallery of pictures.

However, in some cases we would love to have a little introduction paragraph or some kind of summary of what this gallery page we am showing is about.

It’s very straight forward to show the gallery but whatever content we composed through WordPress admin doesn’t really get used at all.

I have had a look around on google and even portfolio press forum, and I found someone else also have the same issue reported. However, it wasn’t really the solution I was looking for.

Therefore I come up with my solution.

First of all, I didn’t want to touch the original portfolio theme files for numerous reasons:

  1. Our changes in those original files will get swiped out when the theme gets updated.
  2. We might break some functions because we am not fully aware of everything inside the theme.

As reasons above, we’re better off to create a child theme which inherits from the portfolio press theme and make changes in the child theme files instead. Click here to find out why and how to create a child theme from Portfolio Press.

Once we have child theme ready, create a sub folder called ‘templates’ as image below

Portfolio Press Child Theme Folder Structure
Portfolio Press Child Theme Folder Structure

Next, create a copy of file called ‘full-width-image-gallery-formats.php‘ from the original Portfolio Press theme folder and move it into the themes folder created as above.

Then we need to add php code as below

right after

and before

That’s it. After this change, we now can reused the content of the page to show some introduction text or whatever content we want before the images gallery.

Let me know what your thoughts are on this. Hope this help someone 🙂

 

How to translate the whole web page

Google translate is one of the best tool for translating any words in one language to another language.

What about translating the whole web page? To do that, we can easily achieve with Chrome browser.

Following the steps below to translate the whole web page:

  1. Browse to any website that requires translation. For example, we can go to http://vnexpress.net/.
  2. Right click any space on the page, and select “Translate to English” option.

    translate1

  3. Wait for a few second, a little popups window will appear near the URL bar.
  4. Click on “Options” link.

    translate1

  5. Select the language from and to, then hit “Done” button.translate1

Hope this would help someone 🙂

Binding for Converter Parameter

I have come across the situation where I need to do some Binding for ConverterParameter. Something like

I have done lots of research, and I found out that its impossible to do binding for ConverterParameter.
So I came up with the Solution. I created the Converter but inherited from FrameworkElement

public class ShowDeleteServiceConverter : FrameworkElement, IValueConverter

In the converter class, I created a dependency property

Now, I can do the Binding as usual

And

It might not be the best solution, but it works for me so far. If you have any idea, feel free to drop me comments.

Online Terminals

Looking for a online terminals to learn new programming languages?

Online Terminals
Online Terminals
There are times when we just wanna test or learn something quickly without going through all the hassles to set up the environments; we can definitely use Online terminals.

Online terminals is extremely useful. It provides lots of different terminals.

Whether you are professional developer or beginner just trying to learn how to code, I recommend to give this one a go. You will see how extremely convenient and useful it is.

 

Web developer @Fiserv

Key Duties:

  • Worked on Westpac’s online transform program (OTP) MOBILE + DESKTOP – building the web page and mobile application so the user can log in and do their online banking.
  • Worked on payment component of the application including the UI view, the payment API services to execute CRUD operations to the database.
  • Responsible for accessibility of application (HTML5 standards + Voice over + Talkback + Jaws) – Ensure the application to pass AAA accessibility standards, fully support for blind and impair vision customers.
  • Responsible for UI components and patterns for MOBILE application – It includes how the web elements should look, how the animation should behave based on the business and customers feedback. Ensure the patterns pass the accessibility, browsers and devices compatible.
  • Improving mobile application performance for all mobile devices – reduce the loading time after sign in from 8 seconds to 3 seconds, ensure the application still functions with acceptable speed for the low end devices like Samsung S2, Samsung S3, etc…
  • Implemented NBA (Next Best Action) framework for MOBILE application – based on information from KnowMe system to determine which one is the customer next best action and where the location of that next best action should be on the page
  • Implemented the client side JavaScript framework based on reactjs, redux, angularjs, knockoutjs, requirejs, etc…
  • Implemented javascript unit testing using Moq framework
  • Building css framework based on Less
  • Worked with designer to achieve the look of the icons being used for the application – normal icons for standard resolution and retina version of icons for high screen definition like iphone, ipad, etc…

Technologies used:

  • Accessibility
  • CSS3, HTML5
  • Reactjs, Redux
  • Angularjs
  • Git source control
  • Photoshop
  • Paint.Net
  • MVC, C#
  • KnockoutJs, jQuery
  • Less, Sprite image and css generations

Senior .Net Developer @M&CSAATCHI

Key Duties:

  • Working on front end work and creating eDMs.
  • Web project using MVC3
  • Writing Regression Test
  • BDD (Behaviour Driven Development)

Technologies used:

  • Framework 4, C#,
  • SQL server 2008
  • MVC3
  • MVC4
  • Entity Framework
  • Photoshop
  • Net
  • Selenium
  • SpecFlow
  • SVN source control