Showing posts with label Web. Show all posts
Showing posts with label Web. Show all posts

04 December 2022

Why is web programming looked down amongst programmers?

 Why is web programming looked down amongst programmers?

 

Web programming is awful. Hear me out:

  • You’re usually forced to code in multiple languages
  • Many of those languages have serious flaws and limitations
  • The sands are constantly shifting as browsers, libraries, etc. change, often without discernible improvement
  • Mysterious problems caused by near-invisible factors, sometimes outside your control, are frequent (e.g. strange proxy behaviour; caches)
  • Very basic things arrive late and broken (I remember web developer friends’ excitement about finally getting sockets and a canvas to paint on)

When I meet a developer who likes web development, I assume that’s the only kind of development they do and they’re probably inexperienced. This could be my prejudice, of course; maybe client-side web development is better these days (I wouldn’t know; I’ve been avoiding it for years).

Web development is also a bit like Visual Basic programming in the 90s in that the bar to entry is very low (it’s easy to build something), but the standard of developer required to produce a really good result is extremely high (it’s very difficult to build something good). As a result, there’s an awful lot of really terrible code out there, written and maintained by developers who have no idea what good software design looks like. Software built for the web is not often built for a long life, and there’s a worryingly high tolerance for:

  • Poor user experience (making things look great rather than making them work well)
  • Poor stability (just hit refresh; don’t use the back button; clear your cache and try again)
  • Poor performance (I swear, some web developers have no idea what ‘fast’ really means on a modern computer, and never test on a machine over 5 years old)
  • High resource consumption (never mind, it’s just the client machine’s resources being wasted)
  • Very poor maintainability (we’ll build a whole new one before we make significant changes to this one anyway)

I try not to look down on anyone though. Anyone can learn any kind of development, and getting tribal about technologies and disrespecting people who like things we don’t isn’t productive.

21 April 2015

How to put video on a web page

http://www.gromkov.com/faq/conversion/add_flash_video_to_website.html

(S. Chen: IE uses FLV; Firefox/Chrome use MP4.)

How to add flash video to web site (FLV or SWF)? If you have a web site, then you possibly plan to add a video using FLASH format (.flv or .swf). How to create .flv file? Are there any special things you have to do on the server? What is the easiest way to add flash video to web site? You should convert your video into FLV format. FLV (Flash Video) is a file format used to deliver video over the Internet. FLV content may be embedded within SWF files. SWF is a vector graphics file format. Intended to be small enough for publication on the web, SWF files can contain animations or applets of varying degrees of interactivity and function. SWF file can be played directly in web browser, such as Internet Explorer. But FLV file can not be played directly, because it requires a separate SWF file which reads the video content from FLV. The SWF file that plays FLV file is called ONLINE FLASH PLAYER. If you want to add flash video to your site, then there are two options, which you can consider: OPTION #1 - Host video on your site. Pros: - you can use any online flash player with any skin, interface, look & feel etc; - quality of video is controlled by you only -- make it very good or bad, as you wish; - video size is not limited, you can set any size you like;Cons: - it requires a high bandwidth; - your hosting must be reliable to support requests from many visitors simultaneously;OPTION #2 - Host video on YouTube.com, but insert the video player directly into your web page. Pros: - it doesn't require high bandwidth, it's almost FREE even if you have a lot of visitors; Cons: - flash player includes advertisements and logo of YouTube; #1 - HOST VIDEO ON YOUR WEB SITE

BlueHost offers high-quality web hosting, unlimited space and bandwidth.

Click here to learn more about BlueHost Web Hosting...


Step 1. Download and install FREEWARE Oxelon Media Converter. (S. Chen: For FLV, use Format Factory instead of Oxelon.)

    Click here to download Oxelon Media Converter

Step 2. Launch Oxelon Media Converter. Click Start -> Programs -> Oxelon Media Converter -> Oxelon Media Converter.

Step 3. Click the "Add Files" button, and select your video file, for example myvideo.avi

Step 4. Click the "Browse..." button to select the output directory (where your converted FLV file must be saved).

Step 5. Choose Media Format: "FLV (.flv)", Video Codec: "FLV", Audio Codec: "MP3", Specify Movie Size (Width and Height) (S. Chen: choose 'Default' in Format Factory), Bitrate (quality level) (S. Chen: video 512 audio 128 are ok) and click "Conversion".

Step 6. Upload the converted FLV video file to your website.

Step 7. Download free ONLINE FLASH PLAYER:
Click here to download FLV Player

Step 8. Unzip it, and upload the file player.swf to your website (to the same folder where your FLV video file is located).

Step 9. Finally, insert the following HTML code into web page on your site:

< object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="420" height="344">
< !--[if !IE]>-->
< object type="application/x-shockwave-flash" data="http://www.mysite.com/folder/player.swf" width="420" height="344">
< !--<![endif]-->
< param name="movie" value="http://www.mysite.com/folder/player.swf" />
< param name="wmode" value="transparent" />
< param name="bgcolor" value="#FFFFFF" />
< param name="quality" value="high" />
< param name="allowFullScreen" value="true" />
< param name="allowscriptaccess" value="always" />
< a href="http://www.adobe.com/go/getflash">
< img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
< /a>
< param name="flashvars" value="vdo=http://www.mysite.com/folder/myvideo.flv&amp;autoplay=false" />
< !--[if !IE]>-->
< /object>
< !--<![endif]-->
< /object>




Where www.mysite.com - is the name of your web server/site
folder - path where FLV file and FLASH PLAYER are located
myvideo.flv - name of your FLV file
You can also set any width and height values. Note, the height must be increased by 29 pixels from the original source value. It is the height of the player's bar. So, if the height of your video is 240, you must enter 269.

Done!

Here's a screenshot of FLV player:




You can switch player to fullscreen mode by clicking on the button at the bottom-right corner.

It is possible to use several additional variables in the "flashvars" param. Just enter &amp; before each variable.

autoplay = false or true (false by default if missing)
vdo = http://www.mysite.com/folder/myvideo.flv (this is the video file in flv format, required)
sound = 50 (sound volume 0 to 100; 50 by default if missing)
advert = intro or commercial video (optional)
advertdesc = intro or commercial title (optional)
mylogo = path to image file with your logo (optional)
tracker = URL to track videos on play, statistics (optional)
buffer = buffer size in seconds (type: number, default:2 if missing)
splashscreen = splash image URL (optional)
clickTAG = URL, creates a clickable button over video (optional)
endclipaction = auto call javascript function or open URL at the end of the clip (optional)

Related Sites HTML5 SOLUTION

The method described above will work on many popular internet browsers, but there are some exceptions. For example, internet browsers on iPhone and iPad doesn't support FLASH, but can render HTML5 Video. Therefore, if you want to create a web page with video that works on these "exclusive" HTML5 devices/browsers, you must convert video into MP4 (H264 for video + AAC for audio) and into OGG (Theora for video + OGG Vorbis for audio). Here's how to do that:

Launch freeware Oxelon Media Converter.

Step 1. Click "Add Files", find and open your original video file (for example, myvideo.avi). Select the path where to save the converted files (click "Browse..." to choose the folder).

Step 2. Next, select Media Format: "MP4 (.mp4)", Video Codec: "H264", Audio Codec: "AAC". Choose width, height (S. Chen: 640x480 is ok), bitrates (S. Chen: video 512 audio 128 are ok). (S. Chen: For MP4, use Adobe Premiere instead of Oxelon.)

Step 3. Click "Conversion". Wait several minutes.

Step 4. Next, click "Add Files", open your original video file once again.

Step 5. Select Media Format: "OGG Video and Audio (.ogg)", Video Codec: "Theora", Audio Codec: "VORBIS". Choose width, height, bitrates.

Step 6. Click "Conversion". Wait several minutes.

Step 7. Upload the converted OGG and MP4 files into the folder on your web site (where FLV file is already located).

Step 8. Insert the following HTML code into the web page on your site:

< video width="420" height="315" controls>
< source src="http://www.mysite.com/folder/myvideo.mp4" type="video/mp4" />
< source src="http://www.mysite.com/folder/myvideo.ogg" type="video/ogg" />
< /video>


Where www.mysite.com is the name of your web server/site
folder is the path where MP4, OGG files are located
myvideo.mp4 is the name of your MP4 file
myvideo.ogg is the name of your OGG file
Automatic playback in HTML5 is also possiblle. Just substitute autoplay for controls.
Example: <video width="420" height="315" autoplay>


Also, make sure your server is using the correct mime-types. This is very important! Find ".htaccess" file in the root of your apache server. Add the following lines into .htaccess file:

AddType video/ogg .ogg
AddType video/mp4 .mp4
AddType video/webm .webm


You can even try a mix of both methods. However, in older browsers it may not work at all. Anyway, this is the code -- combination of HTML5 and FLASH, all-in-one:

< video width="420" height="315" controls>
< source src="http://www.mysite.com/folder/myvideo.mp4" type="video/mp4" />
< source src="http://www.mysite.com/folder/myvideo.ogg" type="video/ogg" />
< object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="420" height="344">
< !--[if !IE]>-->
< object type="application/x-shockwave-flash" data="http://www.mysite.com/folder/player.swf" width="420" height="344">
< !--<![endif]-->
< param name="movie" value="http://www.mysite.com/folder/player.swf" />
< param name="wmode" value="transparent" />
< param name="bgcolor" value="#FFFFFF" />
< param name="quality" value="high" />
< param name="allowFullScreen" value="true" />
< param name="allowscriptaccess" value="always" />
< a href="http://www.adobe.com/go/getflash">
< img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
< /a>
< param name="flashvars" value="vdo=http://www.mysite.com/folder/myvideo.flv&amp;autoplay=false" />
< !--[if !IE]>-->
< /object>
< !--<![endif]-->
< /object>
< /video>


Related Sites #2 - HOST VIDEO ON YOUTUBE, AND INSERT VIDEO INTO YOUR WEB PAGE

Step 1. Convert your video to one of the supported formats, using freeware Oxelon Media Converter.

Here is a list of some well-known formats that YouTube supports:

  .MPEG4, 3GPP and MOV files - Typically supporting h264, mpeg4 video codecs, and AAC audio codec
  .FLV - Adobe-FLV1 video codec, MP3 audio codec
  .AVI - Many cameras output this format - typically the video codec is MJPEG and audio is PCM
  .MPEGPS - Typically supporting MPEG2 video codec and MP2 audio
  .WMV
  WebM files - Vp8 video codec and Vorbis Audio codecs

Step 2. Upload video to YouTube: http://www.youtube.com/my_videos_upload

Step 3. On the page, where your video is located on YouTube you can see the following buttons below the player's bar:



Click the "Share" button. Next, click "Embed".

Step 4. Select and copy HTML code. After that, paste the HTML code into your web page.

Step 5. Upload web page to your server. That's all.
 

16 December 2014

Chrome - In Outlook Web App, can not attach files when composing a new email

There are two solutions -

1. Checking 'Use the light version of Outlook Web App' when signing in. Will be able to attach files.

2.

http://www.c7solutions.com/2014/09/group-policy-import-to-fix-google-chrome-v37-issues-with-exchange-server-and-microsoft-crm

A recent update to Google Chrome (37.0.2062.120) removed the ability to support modal dialog boxes. This are dialogs that require your attention and stop you going back to the previous page until you have completed the info required – these are very useful in workflow type scenarios.
Google claim that as 0.004% of web sites use them (from Google anonymous statistics gathering that you can opt into in Chrome) they are justified in removing support for them – but they have not removed other things that have the same level of support!
With this version of Chrome (or the Chromium open source browser) there is a work around until April 30th 2015 that will allow modal dialogs to work again. Without this work around clicking links in OWA and ECP in Exchange 2010 and OWA and EAC in Exchange Online and Exchange 2013 will not popup. This can cause issues such as the inability to attach files in OWA and to create objects in ECP/EAC for the administrator. Popups in Microsoft CRM also do not work.
As a work around you could use a different browser, but if Chrome works for you (or does not in this case) and you are joined to a domain then you can download the following GPO export file and import it into your Active Directory to enable modal dialogs to work again in Exchange Server, Office 365 and Microsoft CRM products.
To download and import this GPO file to enable Chrome modal dialog box functionality to resume (until 30th April 2015, when Google stop allowing the work around) follow these steps:
  1. Download Google Chrome Show Modal Dialog Before 30 April 2015.zip
  2. Copy to a domain controller and expand the zip file. Ensure the contents of the zip file are not placed directly on your desktop as you cannot import from the desktop directly, so if you expand the zip to the desktop then copy the one folder that was created into a new subfolder.
  3. Start Group Policy Management MMC admin tool.
  4. Expand Forest > Domain > Your Domain > Group Policy Objects.
  5. Right click “Group Policy Objects” and choose New
  6. Create a new GPO called “Chrome and Chromium Modal Dialog Box Allow”:
    image
  7. Right click “Chrome and Chromium Modal Dialog Box Allow” GPO that you just made and choose Import Settings
  8. Proceed through the import wizard. You do not need to backup this new GPO on the second page of the dialog as the new GPO is empty.
  9. On the third page of the wizard browse to the parent folder containing the contents of the download above:
    image
  10. Click Next and you should see one backed up GPO listed:
    image
  11. Click Next to import this. If you click View Settings first a web page will open showing you that this GPO sets two registry keys for the computer and two registry keys for the user. These set SOFTWARE\Policies\Chromium\EnableDeprecatedWebPlatformFeatures and Software\Policies\Google\Chrome\EnableDeprecatedWebPlatformFeatures (for both Chromium and Chrome browsers) with a reg key (type string) 1:ShowModalDialog_EffectiveUntil20150430
  12. Proceed with Next and then Finish and the import will begin:
    image
  13. Click OK.
  14. Now link the GPO object to the root of your domain so it impacts all users and to the root of any OU that blocks inheritance. Import to other domains as above or link from this domain depending upon your current policy for managing GPO cross domains.
  15. Delete the zip and folder you downloaded. They are not needed any more.