aCloud WebOS






3.60/5 (7投票s)
aCloud Web 操作系统在云中运行
引言
aCloud 是一个 WebOS,提供快速高效的 Web 桌面环境。 它代表 Arabian Cloud,意味着它专为阿拉伯人民设计。
背景
aCloud 是云上第一个阿拉伯 WebOS,它基于 Silverlight 4,并且是继 SilveOS 之后第二个使用该技术的云系统。
WebOS 或 WebTop 是一个在您的 Web 浏览器中运行的虚拟操作系统。 aCloud 是一个在云上运行的简单 WebOS。 通过 aCloud,任何人都可以编辑他们的文档,撰写和发送邮件,使用日历、地址簿等。WebOS 不是一个操作系统,它是一个应用程序。 使用浏览器,任何人都可以通过互联网使用这个必不可少的日常应用程序。
WebOS 分为多种类别
- 自托管 WebOS,例如 eyeOS
- 远程桌面,例如 Widgeop
- 远程托管 WebOS,例如 ghost WebOS
云计算技术
云计算是一种基于互联网的计算,其中共享资源、软件和信息按需提供给计算机和其他设备,就像电网一样。
云是一组服务器。 用户与云交互,而无需担心它的实现方式。

云有三种类型
- 基础设施即服务(IaaS)
- 平台即服务(PaaS)
- 软件即服务 (SaaS)

云计算层

代码架构
aCloud 基于三层架构
- 表示层:它由 Silverlight 用户控件组成,这些控件构成了整个 Web 桌面的 GUI。
- 业务层:它是一个简单的 Web 服务,其中包含一堆代码,这些代码构成了系统的核心功能。
- 数据层:它是一个简单的 XML 文件,其中包含有关当前 aCloud 用户的信息。
Using the Code
这是一个 aCloud 表示层中的示例用户控件,名为 Card
,其中包含有关当前云用户的个人信息。
Card.Xaml
<UserControl x:Class="aCloud.Card"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="94" d:DesignWidth="226" FontSize="13">
<Grid x:Name="LayoutRoot">
<Border Height="75" Cursor="Hand" HorizontalAlignment="Left" Margin="9,10,0,0"
Name="PictureBorder" VerticalAlignment="Top" Width="68" CornerRadius="10">
<Border.Background>
<ImageBrush ImageSource="/aCloud;component/Images/Profile.png" />
</Border.Background>
</Border>
<TextBlock Height="21" HorizontalAlignment="Left" Margin="81,10,0,0"
Name="UsernameTextBlock" Text="إسم المستخدم" VerticalAlignment="Top"
Width="136" TextTrimming="WordEllipsis" TextAlignment="Right"
FontWeight="Bold" Foreground="WhiteSmoke">
<TextBlock.Effect>
<DropShadowEffect />
</TextBlock.Effect>
</TextBlock>
<TextBlock Height="21" HorizontalAlignment="Left" Margin="81,0,0,32"
Name="LastLoginDateTextBlock" Text="آخر دخول: 00/00/0000"
VerticalAlignment="Bottom" TextAlignment="Right" Foreground="WhiteSmoke" Width="136">
<TextBlock.Effect>
<DropShadowEffect />
</TextBlock.Effect>
</TextBlock>
<TextBlock HorizontalAlignment="Right" Margin="0,64,0,9"
Name="LoginsNoTextBlock" Text="عدد مرات الدخول: 00000" TextAlignment="Right"
Foreground="WhiteSmoke" Width="136">
<TextBlock.Effect>
<DropShadowEffect />
</TextBlock.Effect>
</TextBlock>
</Grid>
</UserControl>
Card.xaml.vb
Imports System.Windows.Media.Imaging
Imports System.IO
Imports aCloud.aCloudService
Partial Public Class Card
Inherits UserControl
Dim MyService As New aCloudServiceSoapClient()
Public Sub New()
InitializeComponent()
End Sub
Public Property Picture As String
Get
Return Nothing
End Get
Set(ByVal value As String)
Dim brush As New ImageBrush()
brush.ImageSource = New BitmapImage(New Uri(value))
PictureBorder.Background = brush
End Set
End Property
Public Property Username As String
Get
Return UsernameTextBlock.Text
End Get
Set(ByVal value As String)
UsernameTextBlock.Text = value
End Set
End Property
Public Property LastLoginDate As String
Get
Return LastLoginDateTextBlock.Text
End Get
Set(ByVal value As String)
LastLoginDateTextBlock.Text = String.Format("آخر دخول: {0}", value)
End Set
End Property
Public Property LoginsNo As String
Get
Return LoginsNoTextBlock.Text
End Get
Set(ByVal value As String)
LoginsNoTextBlock.Text = String.Format("عدد مرات الدخول: {0}", value)
End Set
End Property
Private Sub PictureBorder_MouseLeftButtonUp(ByVal sender As Object, _
ByVal e As System.Windows.Input.MouseButtonEventArgs) _
Handles PictureBorder.MouseLeftButtonUp
Dim ofd As New OpenFileDialog()
ofd.Filter = "Image Files |*.jpg;*.png;*.bmp;*.gif"
ofd.Multiselect = False
If ofd.ShowDialog() Then
Dim bi As New BitmapImage()
Dim data(ofd.File.Length) As Byte
ofd.File.OpenRead().Read(data, 0, data.Length)
MyService.UploadAsync(String.Format("aCloud Users/{0}/Picture.jpg", User.ID), data)
bi.SetSource(ofd.File.OpenRead())
Dim img As New ImageBrush()
img.ImageSource = bi
PictureBorder.Background = img
End If
End Sub
End Class
业务层中有许多函数提供 aCloud 的基本功能。 我将提到其中的一些。
<WebMethod()> _
Public Function GetDirectories(ByVal FullName As String) As List(Of String)
Dim contents As New List(Of String)
Dim path As String = Server.MapPath(FullName)
For Each directory In New DirectoryInfo(path).GetDirectories()
contents.Add(<Directory ID=<%= directory.FullName.Substring_
(directory.FullName.IndexOf("aCloud Users")) %>>
<Name><%= directory.Name %></Name>
<Items><%= Convert.ToBoolean(directory.GetDirectories().Count + _
directory.GetFiles().Count) %></Items>
</Directory>.ToString())
Next
Return contents
End Function
<WebMethod()> _
Public Sub DeleteFile(ByVal FullName As String)
Dim path As String = Server.MapPath(FullName)
File.Delete(path)
End Sub
<WebMethod()> _
Public Sub CreateDirectory(ByVal FullName As String)
Dim path As String = Server.MapPath(FullName)
Directory.CreateDirectory(path)
End Sub
<WebMethod()> _
Public Sub Upload(ByVal FullName As String, ByVal data As Byte())
File.WriteAllBytes(HttpContext.Current.Server.MapPath(FullName), data)
End Sub
数据层的重要部分是一个 XML 文件,其中包含有关云用户的信息。
<?xml version="1.0" encoding="utf-8"?>
<Users>
<User ID="6451be9f-8a63-409d-87c9-af6c14305fe3">
<Name>admin</Name>
<Password>123</Password>
<CreationDate>4/3/2011</CreationDate>
<LastLoginDate>4/3/2011</LastLoginDate>
<LoginsNo>1</LoginsNo>
<Status>Offline</Status>
</User>
<User ID="86612741-dd32-4d3a-bf16-d8fad6c3f2d0">
<Name>demo</Name>
<Password>demo</Password>
<CreationDate>4/3/2011</CreationDate>
<LastLoginDate>4/16/2011</LastLoginDate>
<LoginsNo>235</LoginsNo>
<Status>Offline</Status>
</User>
<User ID="83c5dff7-00dd-47b3-a63b-750677421220">
<Name>test</Name>
<Password>test</Password>
<CreationDate>4/16/2011</CreationDate>
<LastLoginDate>4/25/2011</LastLoginDate>
<LoginsNo>12</LoginsNo>
<Status>Offline</Status>
</User>
</Users>
(来自 aCloud 的屏幕截图)
启动画面
登录
注册
桌面
我的电脑
关注点
- Silverlight 是 RIA 之一,它使 Web 应用程序看起来像桌面应用程序
- 云计算是操作系统的未来。
历史
aCloud WebOS 1.0 测试版,其中包括文件管理的基本功能。
- 在线试用:aCloud
- 在浏览器外安装它,您可以注册或登录
用户名:admin,密码:123