標籤: 網頁設計公司

  • 台達電與福特亮相CES Asia 推新型智慧電動車解決方案

    25日,台達電與福特汽車、海爾、天合光能攜手亮相首屆亞洲消費電子展(CES Asia),宣佈將四方聯合打造的「福特智•能生活」專案引入中國市場。此試點專案將在北京和上海兩個城市率先展開。福特及台達等合作夥伴將為試點家庭提供插電式混合動力汽車、智慧型交流充電樁、太陽能動力設備及智慧家電。   台達電在「福特智•能生活」專案中提供智慧型的電動車充電解決方案,並在福特展臺實地展示了壁掛式高效充電器產品。此壁掛式交流充電器已通過CQC/SRRC認證,採用防塵防水及防破壞機身設計,具備電壓、溫度等保護功能。充電器內建RFID讀卡機,可實現充電用戶身份辨識功能。充電器還內置乙太網通訊功能,可與充電站管理系統集成。   台達電動交通及雲端電源方案事業處總經理張育銘表示,福特這項計畫結合太陽能、家電和充電裝置,台達電導入家庭能源管理,讓電動車充電時用電不會超過既有容量,減少跳電的風險。此外,使用台達的充電裝置能遠端遙控,使用者可透過手機應用程式得知車輛是否充飽電,其還可採時間電價控制時程。   張育銘說,在政府補貼下,大陸電動車市場前景看好,未來幾年每年成長至少都有30%至50%。他表示,台達電開發電動車充電裝置近3年,原本就有和福斯(VW)和富豪(Volvo)合作,今年在大陸的交流充電器銷量預計達4000至5000台,遠高於2014年的數百台。

    本站聲明:網站內容來源於EnergyTrend https://www.energytrend.com.tw/ev/,如有侵權,請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※如何讓商品強力曝光呢? 網頁設計公司幫您建置最吸引人的網站,提高曝光率!!

    網頁設計一頭霧水??該從何著手呢? 找到專業技術的網頁設計公司,幫您輕鬆架站!

    ※想知道最厲害的台北網頁設計公司推薦台中網頁設計公司推薦專業設計師”嚨底家”!!

    ※幫你省時又省力,新北清潔一流服務好口碑

    ※別再煩惱如何寫文案,掌握八大原則!

  • 用Visual C++創建WPF項目的三種主要方法

    用Visual C++創建WPF項目的三種主要方法

    用Visual C++創建WPF項目的三種主要方法

    The problem with using XAML from C++

    Because C++ doesn’t support partial class definitions, it isn’t possible to directly support XAML in VC++ projects using this mechanism. That isn’t, however, the core reason why VC++ doesn’t directly support XAML. In addition to using the x:Class attribute, you can also use the x:Subclass attribute so that the XAML gets compiled into the class specified by the x:Class attribute, and the code behind will define the class specified by x:Subclass, which will be derived from the x:Class type. Thus, the lack of partial classes isn’t that big of a block. The main issue is that, right now, no 100-percent CodeDOM support is available to convert

    the XAML to C++, and that is the single biggest reason why VC++ doesn’t support XAML intrinsically. I don’t know this for sure, but it’s possible that on a later date, the Visual C++ team may work on their CodeDOM support and provide a fully functional XAML-to-C++ converter. Once that’s available, XAML support can be integrated into VC++ projects. As of today, however, that isn’t an option.

    NOTE: CodeDOM is a term used to represent a bunch of types available in the System.

    CodeDom namespace that lets you abstract code into an object model. Source code is represented using the CodeDOM tree and can be converted into source code for a specific language using the CodeDOM code generator for that specific language.

    Still, the fact that you can’t directly use XAML in a Visual C++ project doesn’t mean that WPF applications can’t be written with Visual C++.

    Three ways to write WPF apps using VC++

    You can use three different approaches to write WPF applications using Visual C++. Each has its pros and cons, and we’ll cover each of these approaches in the next section:

    • Use procedural code.

    For one thing, you can directly use procedural code to

    write Avalon-based applications and avoid using XAML. Of course, if you

    do that, you automatically give up the advantages of declarative programming

    that XAML brings in, but for certain scenarios, procedural code often

    serves the purpose well.

    • Dynamically load XAML.

    Alternatively, you can dynamically load XAML during runtime to create your Avalon windows, although the disadvantage is that you’d be distributing a bunch of XAML files with your application.

    • Derive from a class in a C# DLL

    A third technique uses a C# project to create your XAML-based Avalon controls and have a class (or classes) in your C++ project that derives from the classes in the C#-based Avalon DLL. With that mechanism, the UI is created using XAML in the C# project, and the business logic is kept in the C++ project.

    When you’re developing WPF applications with C++, you can use one or more of these approaches to achieve whatever functionality you want. In the next section, you’ll see how to write a simple WPF app with C++/CLI using each of the three techniques mentioned here.

    7.2 Using C++/CLI to write a WPF application

    If Visual C++ doesn’t have support for XAML, and there are no project templates for building an Avalon application (as of the June 2006 CTP), how much extra effort does it take to write Avalon applications using C++? In this section, you’ll find out. You’ll put the three different techniques I described at the end of section

    7.1.2 into action. All three mechanisms have their advantages and disadvantages; you can decide which is most suitable for your specific scenario. First, though, let’s briefly go over how to create a new C++/CLI project for Avalon.

    7.2.1 Creating a new C++/CLI Avalon project

    Avalon is a managed framework, and as such any Visual C++ project that needs to access and use Avalon needs to have the /clr compilation mode turned on.

    Creating a new C++/CLI project with support for Avalon is fortunately not a difficult task. Table 7.1 lists the few simple steps you need to follow each time you create an application (or library, as the case might be) that uses Avalon.

    Table 7.1 Steps to create a C++/CLI Avalon project

    Step Action How To
    1 Generate a new project Using the application wizard, specify the CLR Empty Project template.
    2 Set the SubSystem to /SUBSYSTEM:WINDOWS Apply this change in the Project properties, Linker settings, System sub-setting.
    3 Set the Entry Point to main From Project properties, choose Linker settings and then the Advanced sub-setting.
    4 Add references to the following assemblies: System PresentationCore PresentationFramework WindowsBase Note: Except for System, the other three are required for Avalon.

    At this point, your empty project is ready for writing Avalon code. Of course, you don’t have any code yet to compile, but you’ll fix that soon.

    7.2.2 Using procedural code

    You’ll now write your first Avalon application using C++/CLI, and you’ll do so entirely using procedural code. Think of it as analogous to an instruction book for putting together a table that contains only textual instructions (analogous to the procedural code) and no pictures (analogous to the XAML).

    Create a new CLR project using the steps outlined in the previous section, and add an App.cpp file to it (you can call it whatever you want). Listing 7.2 shows the code for the simplest Avalon application that shows a window onscreen.

    Listing 7.2 A simple Avalon app in procedural code

    If you compile and run the application, you’ll see a window onscreen that can be moved, resized, minimized, maximized, and closed. Avalon requires you to set the COM threading model to single threaded apartment (STA). You do so using the STAThread attribute on the main function . You then create a new instance of the Application object (using gcnew) and invoke the Run method on that instance, passing in a new instance of a Window object (again using gcnew) . The Application class represents an Avalon application and provides the core functionality for running the application. It has a Run method that is called to initiate the application’s main thread. The Run method has an overload that accepts a Window object, which you use in the code. This overload launches the application and uses the specified Window as the main application window. The Window class represents the core functionality of a window and by default provides you with basic windowing functionality such as moving, resizing, and so on, which you verified when you ran the application and saw a fully functional window onscreen.

    Note: Those of you who have an MFC background may see a faint similarity between this model and MFC, where the CWinApp class is analogous to the Application class, and the CFrameWnd class is analogous to the Window

    class. CWinApp has a Run method that provides the default message loop, and Application::Run does something similar. Of course, you shouldn’t infer too much from these minor similarities because they’re totally different UI programming models, but it’s possible that a similar design model was used by the architects of Avalon.

    This little program doesn’t have a lot of functionality; it just uses the default Window object to create and show a window onscreen. Let’s write a more refined application with its own Application-derived object as well as a window with some controls. Figure 7.4 shows a screenshot of what the enhanced application

    will look like.

    The main steps involved would be to derive two classes-one from the Window class, and the other from the Application class. You’ll start with the Window-derived class.

    Figure 7.4

    Enhanced WPF app in C++ (procedural code)

    Writing the Window-derived class

    The first thing you’ll do is add a new class called FirstWindow to your project, which will be derived from the Window class. You’ll also add some member variables for the various controls and set some of the window properties in the constructor. Listing 7.3 shows the code once you’ve done that.

    Listing 7.3 A more functional Avalon app in procedural code

    using namespace System;
    
    using namespace System::Windows;
    
    using namespace System::Windows::Controls;
    

    It’s much like Windows Forms programming, except that the controls you declare ①. are from the System::Windows::Controls namespace (which contains various WPF controls). You set properties like Title, Width, Height, and so on on the window object in the constructor ②. There’s also a call to a method called InitControls ③, where you initialize the child controls (I put it into a separate method to improve the code’s readability). Listing 7.4 shows the InitControls method. Basically, you instantiate each of the child controls, instantiate a container control, add the child controls to the container controls, and finally set the container control as the main Content of the parent window.

    Listing 7.4 Function to initialize the Avalon controls

    void InitControls(void)
    
    {
          listbox = gcnew ListBox();
          listbox->Width = 180;
    
          listbox->Height = 350;
    
          Canvas::SetTop(listbox, 10);
    
          Canvas::SetLeft(listbox, 10);
    
          textbox = gcnew TextBox();
    
          textbox->Width = 180;
    
          textbox->Height = 25;
        
          Canvas::SetTop(textbox, 10);
    
          Canvas::SetLeft(textbox, 200);
    
          addbutton = gcnew Button();
    
          addbutton->Width = 80;
    
          addbutton->Height = 25;
    
          addbutton->Content = "Add";
    
          Canvas::SetTop(addbutton, 45);
    
          Canvas::SetLeft(addbutton, 200);
    
          addbutton->Click += gcnew RoutedEventHandler(this, &FirstWindow::OnAddButtonClick);
    
          maincanvas = gcnew Canvas();
    
          maincanvas->Children->Add(listbox);
    
          maincanvas->Children->Add(textbox);
    
          maincanvas->Children->Add(addbutton);
    
          Content = maincanvas;
    }
    

    Again, you probably notice the similarity with Windows Forms programming.

    You instantiate the child controls ①, ②, and ③, and set various properties like Width and Height, and you also use the Canvas::SetTop and Canvas::SetLeft methods to position them on their container. For the button control, you also add an event handler for the Click event ④. Then, you instantiate the Canvas control (which is a container control for other child controls) and add the child controls as its children ⑤. Finally, you set the Content property of the window to this Canvas control ⑥.

    Now, you need to add the Click event handler for the button control, where you add the text entered into the TextBox to the ListBox:

    void OnAddButtonClick(Object^ sender, RoutedEventArgs^ e)
    {
    ​	listbox->Items->Add(textbox->Text);
    ​	textbox->Text = "";
    ​	textbox->Focus();
    }
    

    Notice that you set the text of the TextBox to an empty string once you’ve added it to the ListBox. You also call the Focus() method so that the user can continue

    adding more entries into the ListBox. The Window-derived class is ready. Let’s now write the Application-derived class.

    Writing the Application-derived class

    You derive a class called FirstApp from Application and add an override for the OnStartup method where you create and show the main window:

    #include "FirstWindow.h"
    
    ref class FirstApp : Application
    {
    public:
    FirstApp(void){}
    
    protected:
          virtual void OnStartup(StartupEventArgs^ e) override
          {
              Application::OnStartup(e);
              FirstWindow^ mainwnd = gcnew FirstWindow();
              mainwnd->Show();
          }
    };
    

    The OnStartup method is called, not surprisingly, when the application has just started. You override that function so that you can instantiate and show the window.

    The base function is responsible for invoking any event handlers associated with the Startup event, and thus you need to call the base method in the override.

    Now, all that’s left is to modify the main function to use the custom Application object instead of the default, as shown here:

    #include "FirstApp.h"
    
    [STAThread]
    
    int main(array<String^>^ args)
    {
    	return (gcnew FirstApp())->Run();
    }
    

    Notice that you don’t specify a window object to the Run method, because the window object is created in the OnStartup override of your Application-derived class.

    Compile and run the application, and try entering some text into the TextBox and clicking the Add button. You should see the text being entered into the ListBox.

    When you use procedural code with Avalon, it’s much like using Windows Forms, where you derive classes from the default controls, set some properties, add some event handlers, and are done. Procedural code is all right to develop WPF applications for simple user interfaces, but sometimes it makes better sense

    to take advantage of XAML and declarative programming. As I’ve mentioned a few times already, XAML isn’t directly supported in VC++, so you’ll have to look at alternate options to make use of XAML. One such option is to dynamically load the XAML at runtime.

    7.2.3 Dynamically loading XAML

    In this section, you’ll rewrite the application you wrote in the previous section, using dynamically loaded XAML. This way, you get to leverage the power of XAML and declarative programming (which you couldn’t in the procedural code technique you used in the previous section). Continuing the instruction-book analogy, this will be like one that has textual instructions that refer to pictures (which describe the various steps needed) and are loosely distributed along with the book but not directly printed in the book. You’ll define the UI using XAML instead of procedural code. When you’re done, you’ll have an identical application

    to the one you previously created.

    Create a new C++/CLI Avalon project using the steps mentioned in the introduction to section 7.2, and call it FirstAvalonDynamic (or whatever you want to call it). The first thing you’ll do is write the XAML (MainWindow.xaml) that represents the UI; see listing 7.5.

    Listing 7.5 XAML for the main window

    <Window
    
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
         Title="First Avalon App (dynamically load XAML)"
    
         Height="400" Width="400"
    
         ResizeMode="NoResize"
    
         > 
    
         <Canvas>
               <ListBox Canvas.Left="10" Canvas.Top="10"
                     Width="180" Height="350"
                     Name="listbox" />
                   <TextBox Canvas.Left="200" Canvas.Top="10"
                     Width="180" Height="25"
                     Name="textbox" />
               <Button Canvas.Left="200" Canvas.Top="45"
                     Width="80" Height="25"
                     Name="addbutton">Add</Button>
         </Canvas>
    </Window>
    

    The XAML shown does exactly what you did with the procedural code earlier. For the control elements, you use the same names using the Name attribute as you use for the member variables in the procedural code. Next, you need to hook an event handler to the Button so that the text entered into the TextBox is inserted

    into the ListBox. For that, you’ll write a helper class, as shown in listing 7.6.

    Listing 7.6 WindowHelper class that implements the event handler

    using namespace System;
    
    using namespace System::Windows;
    
    using namespace System::Windows::Controls;
    
    using namespace System::Windows::Markup;
    
    using namespace System::IO;
    
    ref class WindowHelper
    {
    
         ListBox^ listbox;
    
         TextBox^ textbox;
    
         Button^ addbutton;
    
    
    
    public:
    WindowHelper(Window^ window)
    {
       addbutton = (Button^)window->FindName("addbutton");
    
       textbox = (TextBox^)window->FindName("textbox");
    
       listbox = (ListBox^)window->FindName("listbox");
    
       addbutton->Click += gcnew RoutedEventHandler(
    
       this,&WindowHelper::OnAddButtonClick);
    }
    
    void OnAddButtonClick(Object^ sender, RoutedEventArgs^ e)
    {
       listbox->Items->Add(textbox->Text);
    
       textbox->Text = "";
    
       textbox->Focus();
    }
    
    };
    

    The WindowHelper constructor accepts a Window argument and uses the FindName method ① to get the control with the specified identifier (which maps to the Name attributes you used in the XAML). You also hook an event handler to the addbutton control ②. Finally, you have the event handler③, which is identical to the one you used in the procedural code project. Listing 7.7 shows the code for the Application-derived class, where you override OnStartup as before, except that you create a window dynamically by loading the XAML file from the disk.

    Listing 7.7 The Application-derived class

    ref class FirstAppDynamic : Application
    
    {
    
    public:
    
         FirstAppDynamic(void)
         {
    
         }
    
    protected:
         virtual void OnStartup(StartupEventArgs^ e) override
         {
    
               Application::OnStartup(e);
    
               Stream^ st = File::OpenRead("MainWindow.xaml");
    
               Window^ mainwnd = (Window^)XamlReader::Load(st);
    
               st->Close();
    
               WindowHelper^ mainwndhelper = gcnew WindowHelper(mainwnd);
    
               mainwnd->Show();
    
         }
    
    };
    
    

    You open a file stream to the XAML using File::OpenRead ① and use the overload of XamlReader::Load ② that takes a Stream^ as parameter to create a Window object. This Load method works the magic, by reading and parsing the XAML and building a Window object out of it. You instantiate the WindowHelper object and pass

    this Window object as the argument, so that the event handler for the addbutton control is properly set up ③. You then show the window ④ with a call to Show().

    The main method is much the same as before, where you instantiate the Application object and call Run on it:

    [STAThread]
    int main(array<String^>^ args)
    {
    
          return (gcnew FirstAppDynamic())->Run();
    
    }
    

    The advantage of using this technique over using procedural code is that you get to design your UI in XAML, thereby achieving a level of UI/code separation. You can also use Cider or some other XAML designer to quickly design flexible user interfaces, which would involve a good bit of hand-coding in procedural code.

    The disadvantage is that you have to distribute the XAML file with your application, and if you have multiple windows, you then need that many XAML files.

    There’s always the risk of a loosely-distributed XAML file getting corrupted (accidentally or otherwise) or even being deleted. You can embed all the XAML files as resources in the C++/CLI assembly and load them at runtime, but even that involves a lot of extra work. To avoid distributing XAML files loosely with your

    application or embedding them as resources, you may want to use the technique we’ll discuss in the next section: putting the XAML into a C# project and accessing it via a derived class in a C++ project.

    7.2.4 Deriving from a class in a C# DLL

    You’ll write a third variation of the same application in this section. You’ll use a C# control library project for the XAML, and a C++ project that will utilize that XAML control by deriving a control from it. Using the instruction-book analogy again, this is essentially a picture-based, step-by-step guide with the textual

    instructions printed alongside each picture providing some meta-information for the step indicated by that picture. First, use the New Project Wizard to generate a new C# .NET 3.0 Custom Control Library project, and delete the default XAML file generated by the wizard. The default XAML is derived from User-

    Control and isn’t what you want. Add a new XAML file to the C# project that represents a Window, and either use Cider or hand-code the XAML from listing 7.8 into that file.

    Listing 7.8 The Window class definition using XAML

    <Window x:Class="CSXamlLibrary.BaseWindow"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         Title="First Avalon App (dynamically load XAML)"
         Height="400" Width="400"
         ResizeMode="NoResize"
         > 
    
         <Canvas>
               <ListBox Canvas.Left="10" Canvas.Top="10"
                     Width="180" Height="350"
                     Name="listbox" x:FieldModifier="protected" />
    
               <TextBox Canvas.Left="200" Canvas.Top="10"
                     Width="180" Height="25"
                     Name="textbox" x:FieldModifier="protected" />
    
               <Button Canvas.Left="200" Canvas.Top="45"
                     Width="80" Height="25"
                     Name="addbutton" x:FieldModifier="protected">Add</Button>
         </Canvas>
    
    </Window>
    

    The XAML is identical to that used in the previous project (where you dynamically loaded it) except for the x:Class attribute for the Window element, which specifies the name of the class that will be generated, and the x:FieldModifier attributes that are applied to the child control elements so they’re generated as protected members in the class (rather than as private which is the default). Build the C# project, and generate the control library. Once that’s done, create a new C++/CLI Avalon project (using the same steps as before), and then add a reference to this C# project. Now, you can write a new Window class that’s derived from the class in the C# DLL, as shown in listing 7.9.

    Listing 7.9 Deriving the main window from the XAML-defined Window class

    using namespace System;
    
    using namespace System::Windows;
    
    using namespace System::Windows::Controls;
    
    
    
    ref class AppMainWindow : CSXamlLibrary::BaseWindow
    {
         public:
               AppMainWindow(void)
               {
                     addbutton->Click += gcnew RoutedEventHandler(this, &AppMainWindow::OnAddButtonClick);
               }
    
               void OnAddButtonClick(Object^ sender, RoutedEventArgs^ e)
               {
    
                     listbox->Items->Add(textbox->Text);
    
                     textbox->Text = "";
    
                     textbox->Focus();
    
               }
    
    };
    

    The code is similar to what you’ve seen thus far, except that it’s a lot cleaner.

    Unlike the first example, you don’t have a lot of clogged procedural code to create the UI. Unlike the second example, you don’t need a helper class to map the XAML elements to the control variables and event handlers. It’s definitely an improvement over the previous two examples, but you have to bring in the C#

    project just for the XAML. The rest of the code needed for the application is more or less similar to what you saw earlier:

    ref class FirstAppDerived : Application
    {
          protected:
                virtual void OnStartup(StartupEventArgs^ e) override
                {
                      Application::OnStartup(e);
                      AppMainWindow^ mainwnd = gcnew AppMainWindow();
                      mainwnd->Show();
                }
    
    };
    
    [STAThread]
    
    int main(array<String^>^ args)
    {
          return (gcnew FirstAppDerived())->Run();
    }
    

    In some ways, the third technique is a sort of hybrid of the previous two techniques.

    A lot of the code is identical to that in the first technique – as with the declaration of a custom class derived from Window and an Application-derived class with the OnStartup method creating the custom window. But, like the second technique, the UI definition is in the XAML, except that in this case, it’s compiled into the C# DLL. You also reduce lines of code with each successive technique. You had the most lines of code with procedural code (as is to be expected) and improved on that considerably when you moved the UI definition to the XAML in the dynamically-loaded XAML example. In the last example, you saved even further on lines of code, such as the helper class from the second example that had to wire the XAML elements to the member variables. Of course, the total lines of code (LOC) isn’t always the single deciding factor that determines what technique you choose. Table 7.2 shows a comparison of the three techniques; for each factor, the cells with the bold text reflect the technique (or techniques) that offer maximum performance (or convenience).

    Table 7.2 Comparison of the three techniques

    Procedural code Dynamically load XAML XAML in C# DLL
    Cluttered code that generates the UI Yes No No
    Dependency on loose XAML files No Yes No
    Dependency on C#-based DLL No No Yes
    Lines of code Maximum In-between Minimum
    UI design convenience Poor Excellent Excellent
    UI/business logic separation Poor Good Excellent
    Level of Visual C++ project support Total Partial (Not applicable)

    It’s hard to pinpoint a specific technique and claim that it’s the best one, because depending on your requirements, each has advantages and disadvantages. Of course, in the future, if Visual C++ has direct support for XAML (as I believe it will), that will be your best option for the majority of scenarios.

    本站聲明:網站內容來源於博客園,如有侵權,請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※帶您來了解什麼是 USB CONNECTOR  ?

    ※自行創業 缺乏曝光? 下一步"網站設計"幫您第一時間規劃公司的門面形象

    ※如何讓商品強力曝光呢? 網頁設計公司幫您建置最吸引人的網站,提高曝光率!!

    ※綠能、環保無空污,成為電動車最新代名詞,目前市場使用率逐漸普及化

    ※廣告預算用在刀口上,網站設計公司幫您達到更多曝光效益

    ※教你寫出一流的銷售文案?

  • 如何使用ABP進行軟件開發之基礎概覽

    如何使用ABP進行軟件開發之基礎概覽

    ABP框架簡述

    1)簡介

    在.NET眾多的技術框架中,ABP框架(本系列中指aspnetboilerplate項目)以其獨特的魅力吸引了一群優秀開發者廣泛的使用。

    在該框架的賦能之下,開發者可根據需求通過官方網站【https://aspnetboilerplate.com/Templates】選擇下載例如Vue/AngluarJS/MVC等不同類型的模板項目,輕鬆加入ABP開發者的隊伍中,盡享基於ABP開發帶來的樂趣。

    ABP開發框架也提供了豐富的文檔,能夠為開發者帶來許多便捷。目前ABP的文檔網站為:

    官方文檔:https://aspnetboilerplate.com/Pages/Documents

    文檔庫不可謂不全,加上國內眾多的ABP開發者參与的活躍的技術圈子,使得學習成本只是在第一個項目中比較高,後期將會越來越平滑。

    2)現狀

    當然,目前ABP的框架開發者和社區已經把更多的精力投入到了ABP.VNEXT開發框架,這個新框架以其DDD+微服務+模塊化的理念獲得了大量擁躉,使ABP框架的開發優先級已經開始逐漸降低。

    但這是因為ABP框架的功能已經成熟穩定,且ABP是一種增量式的架構設計,開發者在熟練掌握這種框架后,可以根據自己的需要進行方便的擴展,使其成為小項目架構選型中一種不錯的備選方案。

    當然,也存在一些弊端。例如由於ABP被稱為.NET眾多開發框架中面向領域驅動設計的最佳實踐,而囿於領域驅動設計本身不低的門檻,使得學習的過程變得看起來非常陡峭;

    除此之外,ABP也廣泛使用了目前Asp.NET/Asp.NET Core框架的大量比較新的特性,對於不少無法由於各種原因無法享受.NET技術飛速發展紅利的傳統開發者來說,無形中也提高了技術門檻。

    3)綜述

    在這個系列中,本文計劃分成三篇來介紹ABP框架,第一篇介紹ABP的基礎概覽,介紹基礎知識,第二篇介紹ABP的模式實踐,第三篇,試圖介紹如何從更傳統的三層甚至是單層+SQL的單層架構,如何遷移到ABP框架。

    (畢竟。。.NET遺留應用實在是太多了,拯救或不拯救?)

    代碼結構結構

    基本文件夾簡述

    當我們通過ABP模板項目的官方網站下載一個項目后,我們所獲得的代碼包的結構如下圖所示,其中:

    • vue為使用iview框架構建的管理系統基本模板,該腳手架使用了yarn作為包管理器,並集成了vuex/axios等常用框架,並提供了用戶,租戶,權限三個基本功能的示例代碼,開發者只需發揮聰明才智就能快速的通過該框架入手前端項目。
    • (當然,該項目廣泛使用了typescript+面向對象的設計,似乎前端開發者。。普遍不擅長面向對象開發?)
    • aspnet-core則是一個完整的asp.netcore項目的快速開發腳手架。該腳手架集成了docker打包於一體,並包含基本的單元測試示例,使用了identity作為權限控制單元,使用swagger作為接口文檔管理工具,集成了efcore、jwt等常用組件,對於開發者來說,基本上算是開箱即用了。

    前端vue項目

    打開vue文件夾之後,該項目的基本目錄如下圖所示。(src文件夾)

    lib文件夾

    定義了與abp+vue腳手架項目的基礎組件和常見類庫,封裝了一系列基本方法。例如權限控制,數據請求,菜單操作,SignalR等基礎組件的用法。

    router文件夾

    定義了vue項目的路由規則,其中index.ts文件是項目的入口,router.ts文件定義了vue文件的路由規則。

    store文件夾

    由於本項目使用了vuex框架,所以我們可以來看看對於store文件夾的介紹。

    在vuex框架中:

    每一個 Vuex 應用的核心就是 store(倉庫)。“store”基本上就是一個容器,它包含着你的應用中大部分的狀態 (state)。
    Vuex 和單純的全局對象有以下兩點不同:
    Vuex 的狀態存儲是響應式的。當 Vue 組件從 store 中讀取狀態的時候,若 store 中的狀態發生變化,那麼相應的組件也會相應地得到高效更新。
    你不能直接改變 store 中的狀態。改變 store 中的狀態的唯一途徑就是顯式地提交 (commit) mutation。這樣使得我們可以方便地跟蹤每一個狀態的變化,從而讓我們能夠實現一些工具幫助我們更好地了解我們的應用。

    即vuex框架中,將原來的請求鏈路,抽象化為狀態的變化,通過維護狀態,使得數據的管理更加便捷,也易於擴展。

    views文件夾

    定義了登錄、首頁、用戶、角色、租戶的基本頁面,並提供了新增、查看、編輯、刪除的代碼示例。

    綜上,該項目是一個結構清晰,邏輯縝密的前端框架,可以作為常見管理系統的腳手架。

    後端項目

    簡介

    後端項目是一個遵循了領域驅動設計的分層,同時又符合Robert Martin在《代碼整潔之道》提出的【整潔架構】。

    領域驅動設計簡介

    在領域驅動設計的分層設計中,共有四個功能分層,分別是:

    表示層(Presentation Layer):為用戶提供接口,使用應用層實現用戶交互。

    應用層(Application Layer):介於用戶層和領域層之間,協調用戶對象,完成對應的任務。

    領域層(Domain Layer):包含業務對象和規則,是應用程序的心臟。

    基礎設施層(Infrastructure Layer):提供高層級的通用技術功能,主要使用第三方庫完成。

    在後文中,基於abp對領域驅動設計的功能分層將進行多次、詳細敘述,本小節不再贅述。

    整潔架構簡介

    整潔架構是由Bob大叔提出的一種架構模型,來源於《整潔架構》這本書,顧名思義,其目的並不是為了介紹這一種優秀的架構本身,而是介紹如何設計一種整潔的架構,使得代碼結構易於維護。

    (整潔架構就是這樣一個洋蔥,所以也有人稱它為“洋蔥”架構)

    1. 依賴規則(Dependency Rule)

    用一組同心圓來表示軟件的不同領域。一般來說,越深入代表你的軟件層次越高。外圓是戰術是實現機制(mechanisms),內圓的是核心原則(policy)。

    Policy means the application logic.

    Mechanism means the domain primitives.

    使此體系架構能夠工作的關鍵是依賴規則。這條規則規定軟件模塊只能向內依賴,而裏面的部分對外面的模塊一無所知,也就是內部不依賴外部,而外部依賴內部。同樣,在外面圈中使用的數據格式不應被內圈中使用,特別是如果這些數據格式是由外面一圈的框架生成的。我們不希望任何外圓的東西會影響內圈層

    1. 實體 (Entities)

    實體封裝的是整個企業範圍內的業務核心原則(policy),一個實體能是一個帶有方法的對象,或者是一系列數據結構和函數,只要這個實體能夠被不同的應用程序使用即可。

    如果你沒有編寫企業軟件,只是編寫簡單的應用程序,這些實體就是應用的業務對象,它們封裝着最普通的高級別業務規則,你不能希望這些實體對象被一個頁面的分頁導航功能改變,也不能被安全機制改變,操作實現層面的任何改變不能影響實體層,只有業務需求改變了才可以改變實體

    1. 用例 (Use case)

    在這個層的軟件包含只和應用相關的業務規則,它封裝和實現系統的所有用例,這些用例會混合各種來自實體的各種數據流程,並且指導這些實體使用企業規則來完成用例的功能目標。

    我們並不期望改變這層會影響實體層. 我們也不期望這層被更外部如數據庫 UI或普通框架影響,而這也正是我們分離出這一層來的原因所在。

    然而,應用層面的操作改變將會影響到這個用例層,如果需求中用例發生改變,這個層的代碼就會隨之發生改變。所以可以看到,這一層是和應用本身緊密相關的

    1. 接口適配器 (Interface Adapters)

    這一層的軟件基本都是一些適配器,主要用於將用例和實體中的數據轉換為外部系統如數據庫或Web使用的數據,在這個層次,可以包含一些GUI的MVC架構,表現視圖 控制器都屬於這個層,模型Model是從控制器傳遞到用例或從用例傳遞到視圖的數據結構。

    通常在這個層數據被轉換,從用例和實體使用的數據格式轉換到持久層框架使用的數據,主要是為了存儲到數據庫中,這個圈層的代碼是一點和數據庫沒有任何關係,如果數據庫是一個SQL數據庫, 這個層限制使用SQL語句以及任何和數據庫打交道的事情。

    1. 框架和驅動器

    最外面一圈通常是由一些框架和工具組成,如數據庫Database, Web框架等. 通常你不必在這個層不必寫太多代碼,而是寫些膠水性質的代碼與內層進行粘結通訊。

    這個層是細節所在,Web技術是細節,數據庫是細節,我們將這些實現細節放在外面以免它們對我們的業務規則造成影響傷害

    ABP的分層實現

    在ABP項目中,層次劃分如下。

    1. 應用層(Application項目)

    在領域驅動設計的分層式架構中,應用層作為應用系統的北向網關,對外提供業務外觀的功能。在Abp模板項目中,Application項目也是編寫主要用例代碼的位置,開發者們在此定義與界面有關的數據行為,實現面向接口的開發實踐。

    應用服務層包含應用服務,數據傳輸單元,工作單元等對象。

    • Application Service

    為面向用戶界面層實現業務邏輯代碼。例如需要為某些界面對象組裝模型,通常會定義ApplicationService,並通過DTO對象,實現與界面表現層的數據交換。

    • Data Transfer Object (DTO)

    最常見的數據結構為DTO(數據傳輸對象),這是來源於馬丁弗勒在《企業架構應用模式》中提到的名詞,其主要作用為:

    是一種設計模式之間傳輸數據的軟件應用系統。 數據傳輸目標往往是數據訪問對象從數據庫中檢索數據。

    在ABP的設計中,有兩種不同類型的DTO,分別是用於新增、修改、刪除的Input DTO,和用於查詢的Output DTO。

    • Unit of Work:

    工作單元。工作單元與事務類似,封裝了一系列原子級的數據庫操作。

    2. 核心層(Core項目)

    核心層包含領域實體、值對象、聚合根,以及領域上下文實現。

    • Entity(實體):

    實體有別於傳統意義上大家所理解的與數據庫字段一一匹配的實體模型,在領域驅動設計中,雖然實體同樣可能持久化到數據庫,但實體包含屬性和行為兩種不同的抽象。

    例如,如果有一個實體為User,其中有一個屬性為Phone,數據為086-132xxxxxxxx,我們有時需要判斷該手機號碼的國際代號,可能會添加一個新的判定 GetNationCode(),可以通過從Phone字段中取出086來實現,這就是一種通俗意義上的行為。

    • Value Object(值對象):

    值對象無需持久化到數據庫,往往是從其他實體或聚合中“剝離”出來的與某些聚合具備邏輯相關性或語義相關性的對象,有時值對象甚至只有個別屬性。

    例如,上述實體,包含Phone字段,我們可以將整個Phone“剝離”為一個Telephone對象,該對象可包含PhoneNumber和NationCode字段。

    public class User
    {
         public Telephone Phone{public get;private set;}
    }
    public class Telephone
    {
        public string  PhoneNumber {get;set;}
         public string NationCode  {get;set;}
    }
    
    • Aggregate & Aggregate Root(聚合,聚合根):

    聚合是業務的最小工作單元,有時,一個實體就是一個小聚合,而為聚合對外提供訪問機制的對象,就是聚合根。

    在領域驅動設計中,識別聚合也是一件非常重要的工作,有一組系統的方法論可以為我們提供參考。

    當然,事實上識別領域對象,包括且不限定於識別聚合、值對象、實體識別該對象的行為或(方法)本身是一件需要經驗完成的工作,有時需要UML建模方法的廣泛參与。

    有時,我們會習慣於通過屬性賦值完成梭代碼的過程,從而造成領域行為流失在業務邏輯層的問題,那麼或許可以採取這樣的方法:

    1、對象的創建,使用構造函數賦值,或工廠方法創建。

    2、將所有對於屬性的訪問級別都設置為

    public string Phone{public get;private set;}
    

    然後再通過一個綁定手機號碼的方法,來給這個對象設置手機號碼。

    public string BindPhone(string phone)
    {
    }
    

    將所有一切涉及到對Phone的操作,都只能通過規定的方法來賦值,這樣可以實現我們開發過程中,無意識的通過屬性賦值,可能導致的“領域行為”丟失的現象發生。
    這種方式可以使得對對象某些屬性的操作,只能通過唯一的入口完成,符合單一職責原則的合理運用,如果要擴展方法,可以使用開閉原則來解決。

    但是,採用這種方式,得盡量避免出現:SetPhone(string phone) 這樣的方法出現,畢竟這樣的方法,其實和直接的屬性賦值,沒有任何區別。

    • Repository(倉儲)

    倉儲封裝了一系列對象數據庫操作的方法,完成對象從數據庫到對象的轉換過程。在領域驅動設計中,一個倉儲往往會負責一個聚合對象從數據庫到創建的全過程。

    • Domain Service(領域服務)

    領域服務就是“實幹家”,那些不適合在領域對象中出現,又不屬於對象數據庫操作的方法,又與領域對象息息相關的方法,都可以放到領域服務中實現。

    • Specification(規格定義)

    規範模式是一種特殊的軟件設計模式,通過使用布爾邏輯將業務規則鏈接在一起,可以重新組合業務規則。

    實際上,它主要用於為實體或其他業務對象定義可重用的過濾器。

    3. 其他基礎設施(EntityFrameworkCore,Web.Core,Web.Host項目)

    EntityFrameworkCore負責定義數據庫上下文和對EFCore操作的一系列規則、例如種子數據的初始化等。

    Web.Core:定義了應用程序的外觀和接口。雖然從表面上看,Web.Core定義了作為Web訪問入口的控制器方法和登錄驗證的邏輯,看起來像是用戶表現層的東西,但是仔細想想,這些東西,何嘗不是一種基礎設施?

    Web.Host:定義WEB應用程序的入口。

    總結

    本文簡述了ABP框架的前後端項目的分層結構,通過了解這些結構,將有助於我們在後續的實戰中更快入手,為應用開發插上翅膀。

    本站聲明:網站內容來源於博客園,如有侵權,請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※為什麼 USB CONNECTOR 是電子產業重要的元件?

    網頁設計一頭霧水??該從何著手呢? 找到專業技術的網頁設計公司,幫您輕鬆架站!

    ※想要讓你的商品成為最夯、最多人討論的話題?網頁設計公司讓你強力曝光

    ※想知道最厲害的台北網頁設計公司推薦台中網頁設計公司推薦專業設計師”嚨底家”!!

    新北清潔公司,居家、辦公、裝潢細清專業服務

  • 四周年:聊聊測試工程師的核心競爭力

    四周年:聊聊測試工程師的核心競爭力

    寫博客四周年,習慣每年這個時候做一次總結回顧。這次,就聊聊工作幾年以來,我個人對核心競爭力的一些思考和認知。。。

    往期傳送門

    一周年:聊聊寫博客這件事

    兩周年:聊聊這一年的成長

    三周年:聊聊近期目標和計劃

     

    核心競爭力,各人有各人的想法。且在不同階段、不同企業、不同時期有不同的視角,無法一一而足。以我個人角度來說:核心競爭力實際上就是個人價值訴求的一種表達

    我劃分了四個較為通用的維度,從這幾個維度出發,聊聊不同階段我的一些看法和建議。

    思維導圖

     

    時間維度

    1、小白入門

    通常來說,小白入門階段,指的是初入職場一年以內的同學。

    在這個階段,個人的核心競爭力,或者說個人價值的體現,就是高效執行能力+快速學習能力

    工作職責、範圍、流程、規範、溝通能力,在這個階段,也許會遇到不同的挑戰,但企業一般對新同學包容性都比較強,這個階段試錯空間較大,最利於新入成長。

    2、快速成長

    快速成長階段,一般指的是工作1-3年的同學。這個階段,個人認為核心競爭力主要體現在協同配合+ownership(主人翁意識,或者說是主動承擔工作的能力)。

    當然,這個階段也會面臨職場第一次跳槽,如何編寫簡歷、面試、談offer、如何選擇就職行業、在團隊內刷存在感等事情。

    表述可能有些直接,但這個階段,對未來的職場發展,影響往往是很大的。建議找個業內熟識的前輩,聊聊天,請教一下

    3、專註沉澱

    這個階段的同學我劃分為3-5年的同學,一般來說這個階段,會成為團隊里的中堅力量,甚至會承擔一部分所謂的“管理”的工作。

    除了上述的幾點核心能力,我認為這個階段的同學,核心競爭力,往往體現在客觀的思考能力+創造價值的能力

    如何理解創造價值?初入職場大多是聽安排做事,這個階段,會漸漸過渡到分配任務並且帶領小團隊快速高效完成工作的狀態。

    至於專註沉澱,這個階段建議對自己的技術棧+未來五年職場規劃進行多次深入的review,這是一個不斷否定不斷堅持的過程。

    4、成為專家

    如何理解專家?即在某一個領域內擁有豐富經驗+專業特長+深入研究的人。一般在職場中,七年左右可以稱之為專家。

    在《刻意練習:如何從新手到大師》這本書中,講述了很多關於成為某一個領域專家的方法,推薦大家閱讀這本書。

    在這個階段,核心競爭力,反而簡單,即上面講到的創造價值

    如何創造價值?解決團隊目前存在的核心問題,從基礎建設、流程規範、技術、分享、管理多方面來保質提效。

    當然,最關鍵的是,主動傳達自己創造的價值!這個很考驗一個人的耐心和協調溝通能力,概括一下就是:深諳職場生存法則

     

    核心能力

    關於核心能力,其實在上面的幾個階段,都做了解讀。這裏我有個建議,你的核心能力,可以在簡歷的個人評價里體現出來

    好的簡歷可以擺平面試求職路上的很多客觀因素,當然,也能吸引到某些獵頭的挖掘。

    當然,不僅僅是簡歷,還有其他的一些客觀條件,這個請看下文。

    1 # 這裏僅提供一個demo供參考
    2 1、對項目整體業務和系統架構有較全面了解,能獨立解決複雜任務; 3 2、能與其他團隊建立良好的合作關係,並組織主導完成工作; 4 3、自我驅動能力強,熱愛分享,善於思考總結; 5 4、保持技術前瞻性,鑽研新技術及方法,並推動在工作中落地;

     

    職場生涯

    關於職場生涯,有很多博主很多大牛說過,這裏我順帶談談我的看法。

    在專註沉澱階段(3-5年),為什麼要建議對自己的技術棧以及未來五年的職場規劃進行多次review呢?

    一方面,這個階段會在技術和業務上有一定的深入和廣度;另一方面,職場或者說未來職業發展需要的是一專多能的在細小領域有較高成就的人

    一般來講,這個階段需要對業務&技術做個權重。業務專家?技術大神?或者基層管理。

    管理是一個蘿蔔一個坑,在互聯網領域,個人覺得對普通人來講,業務專家或技術大神,對普通人更友好。

    不需要做多大範圍的TOP1,你只需要堅持去做下面幾點,就能有所收穫。

     

    個人成長

    關於個人成長,前段時間看了本書:《軟技能:代碼之外的生存指南》。裏面介紹了很多有趣的觀點和方法,大家不妨一讀。

    挑幾個關鍵的point來談談我自己的個人成長曆程,也許會對你有所觸動。

    1、寫作博客

    大概工作第三年開始,我開通了博客,並且堅持每周都更新。有總結,有實踐,有思考,也有很多自己創造的內容。我把寫博客這件事叫做爆肝。。。

    寫了一段時間,你會發現漸漸有了流量,有了評論,有了錯誤指摘,也有抬杠。從這些“收穫”里,你能將自己的底子打得更好,當然,知名度,或許有些罷。。。

    2、開公開課

    有了寫博客的沉澱(不一定寫博客,自己做筆記也可,但我還是建議寫博客,交流更重要,閉門造車要不得),你可以嘗試開公開課,比如:QQ群直播、網易公開課、騰訊課堂等。

    如何將自己知道的東西,簡潔明了的傳遞給別人,在溝通分享中重塑自身的知識體系,是很有意思也很有挑戰的一件事。

    職場向上發展,分享、培訓、演講是少不了的。有備無患,才是智者取勝之道。

    這個過程里,你會發現自己以往的遺漏、錯誤、表述的誤差,也能從別人口中獲悉成長的力量。

    3、著書立說

    這個對很多同學來說可能有點不可思議,但其實沒那麼難。我認識測試圈子的同學比如小坦克,基於抓包進行接口&自動化測試,已經出了2本書了。

    我自己也正在寫自己的第一本書:從零開始性能測試。

    當然,給了我勇氣讓我開始下筆寫書的原因,一方面是想建立個人的品牌影響力;另一方面,通過博客,有好幾位出版社的編輯找到了我,不好意思拒絕他們的熱情相邀,就索性寫一本書吧。

    人這一生,總要做幾件讓自己回想起來就覺得中二熱血的事情。。。

    4、諮詢培訓

    關於諮詢培訓,其實和轉崗斜杠很類似。生存所需嘛,憑自己的本事站着吃飯,不寒磣。

    通過自我成長,寫博客,開公開課,建立個人影響力,嘗試付費諮詢,做培訓,運營公眾號,接商業推廣,甚至極客時間開一門課,都是可以嘗試的。

    很多事情不是看到希望才做,而是做了才能有所收穫。

    當然,這個過程中,你會開始思考如何拓展推廣渠道,引流拉新,提高創作內容的質量,遇到很多未知領域的挑戰。

    別怕,向前走,前面有光!

     

    本站聲明:網站內容來源於博客園,如有侵權,請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※如何讓商品強力曝光呢? 網頁設計公司幫您建置最吸引人的網站,提高曝光率!!

    網頁設計一頭霧水??該從何著手呢? 找到專業技術的網頁設計公司,幫您輕鬆架站!

    ※想知道最厲害的台北網頁設計公司推薦台中網頁設計公司推薦專業設計師”嚨底家”!!

    ※幫你省時又省力,新北清潔一流服務好口碑

    ※別再煩惱如何寫文案,掌握八大原則!

  • “你開廠門 我開方便之門” ——福建省市場監管系統“促產”側記

      中國消費者報報道(記者 張文章)最近是企業復工復產的高峰期,然而復工復產、疫情防控兩手抓,兩手都要硬。復工復產面臨許多困難和擔憂:員工食堂就餐怎麼才安全?商事辦理如何才簡便?企業趕工,設備運作如何跟進?別擔心,福建省市場監管局早幫企業想好了,及時推出6方面16條服務措施,全力支持推動生產企業復產、重點項目復工。並呼籲相關企業大膽開門復產,把失去的時間搶回來,補回來。

      復工怎麼吃飯 築防線

      隨着復工復產高峰期臨近,集體用餐需求顯著增加,為深入做好新冠肺炎疫情防控工作,防範群體性聚餐可能引發的風險,福建省市場監管部門牽頭整合美團、餓了么等網絡訂餐平台和餐飲企業搭建疫情期間集體用餐配送服務平台,在保供應、保質量、強信心方面起到了积極作用。

      福州市台江區對復工企業食堂衛生狀況進行檢查,嚴查食材進貨來源,要求分時段分餐制,避免扎堆就餐。同時嚴格環境消殺,下發《預防性消毒工作手冊》,督促農貿市場、超市、餐飲店、非星級酒店嚴格落實清潔消毒制度,每日開市前、收市后全面消毒,加大對重點區域、重點設施設備消毒頻次。規範網絡外賣平台經營,推行無接觸配送。

      廈門市集美區杏林市場監管所“嚴把三關”,做好“小餐飲”復工安全。復工前,申請報備關。全面摸排掌握轄區“小餐飲”數據庫,通過電話、微信等,向2571家餐飲經營者詳細告知復工標準,督促餐飲單位在恢復營業前,提前向市場監管部門報備。復工時,現場檢查關。收到經營者報備后,執法人員按照網格劃分及時到現場檢查,對從人員健康狀況、體溫檢測、場所消殺、庫存食材清理等各方面進行詳細指導和嚴格把關。復工后,日常監督關。通過網格員每日現場巡查、微信宣傳、發動社區群眾舉報等方式,做好已復工“小餐飲”的日常監督。

      泉州市市場監管部門加強外賣訂餐平台監管,在疫情防控期間全面實行“無接觸送餐”;鼓勵入網餐飲單位使用“食安封簽”,避免送餐過程二次污染;指導公司選擇證照齊全、供餐資質和能力符合要求的單位訂餐,並設立專門接收台,實行“不見面取餐”;鼓勵企業發動交通方便的員工回家用餐,或自帶餐食解決用餐問題,進一步減少辦公場所用餐時段的人員密度和出入頻次。

      莆田市荔城區已形成市場、超市、餐飲、藥店常態化監管模式,持續提示餐飲服務單位轉變經營思路,採取打包、外賣、分餐配送等非堂食堂聚的經營模式,避免人群聚集傳播風險;有效督促市場開辦者及檔口經營者自律經營,嚴格落實禁止野生動物交易要求,建立健全索證索票、進貨查驗等制度,切實做好食品快檢及公示工作,做到“早發現、早溯源、早處置”,有效保障群眾“舌尖上的安全”。

      備案申請怎麼審批 特事特辦

      為全面有效防控疫情,全力保障人民群眾的生命安全和身體健康,切實提供便捷優質的企業註銷及商事登記服務,福建省市場監管部門為企業提供足不出戶的“網上辦“服務。

      福州市高新區市場監管部門開啟企業復工復產網上辦,利用釘釘App在線受理企業復工申請,開展不見面服務。對企業數據進行實時分析,對於符合高新區復工要求的予以備案。全面推行自主年報制度,通過微信、電話、短信等方式指導企業依法履行信息公示義務,激活更多企業投入生產經營,避免信用受損。

      漳州市長泰縣市場監管局為有效減少人員聚集,暫停窗口現場服務,全面推行“網上辦、掌上辦、郵寄辦、預約辦”審批服務模式,並公示了窗口諮詢電話。對於保障疫情防控工作需要的緊急業務,立足職能,特事特辦、急事急辦,着力打通抗‘疫’審批最後一公里。

      莆田市荔城區市場監管部門充分依託“網上辦、掌上辦、寄遞辦、預約辦”等有效手段,為市場主體提供“零見面、零跑腿、零成本”的高效優質服務,進一步壓減登記註冊環節、時間和成本。對生產企業轉產生產口罩、防護服等應急物資的,簡化生產資質審批程序,實行非要件容缺後補,對可通過數據共享獲取的材料,不要求申請人重複提交。

      三明市大田縣市場監管局加碼提速簡化審批程序,推行“非接觸式”的电子辦照渠道,實行企業名稱自由申報、企業設立網上辦,同時积極引導群眾通過“網上預審+雙向快遞”的方式寄送申請材料並領取證照和相關文書。深化個體工商戶登記制度改革,針對需線下辦證的特殊人群實現“15分鐘辦證圈”。

      設備安全怎麼保障 提供專業服務

      為全面保障疫情期間和節后復工復產企業的特種設備安全,進一步落實特種設備使用單位安全主體責任,福建省市場監管部門對特種設備安全進行了專項檢查。

      廈門市集美區市場監管局第一時間採取微信監管工作群轉發的宣傳形式,督促相關責任單位嚴格落實責任制。聚焦公眾聚集場所使用的特種設備和盛裝極度或高度危害介質、易燃易爆介質的承壓特種設備,採取科所聯動的監管模式,圍繞轄區復工復產企業、已開業的大型商場、樓座較多的居民小區、醫院、地鐵等主要場所加大巡查力度,重點查看在用電梯、鍋爐、液氧儲氣罐等特種設備的檢驗報告、維保記錄、使用單位的安全管理制度、事故應急措施和救援預案等情況。

      泉州市市場監管局組織省特檢院泉州分院和石化中心等兩個特種設備檢驗單位,充分利用特種設備安全監察平台,全面排查受疫情影響需要檢驗的特種設備,主動電話逐家聯繫各使用單位,及時了解復產復工安排,為即將復產復工企業開闢綠色通道,確保企業順利開工。

    責任編輯:邊靜

    本站聲明:網站內容來源再生能源資訊網http://www.ccn.com.cn/,如有侵權請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※帶您來了解什麼是 USB CONNECTOR  ?

    ※自行創業 缺乏曝光? 下一步"網站設計"幫您第一時間規劃公司的門面形象

    ※如何讓商品強力曝光呢? 網頁設計公司幫您建置最吸引人的網站,提高曝光率!!

    ※綠能、環保無空污,成為電動車最新代名詞,目前市場使用率逐漸普及化

    ※廣告預算用在刀口上,網站設計公司幫您達到更多曝光效益

    ※教你寫出一流的銷售文案?

  • 新春走基層·脫貧攻堅一線見聞:八百里瀚海的扶貧之路

      中國消費者報報道(記者李洪濤)噼!啪!清脆的爆竹聲不時在空中炸響。吉林省通榆縣蘇公坨鄉蘇公坨村六撮房屯,這個極具東北特色的小村莊到處散發著濃濃的年味。新春佳節前夕,《中國消費者報》新春走基層的記者跟隨當地市場監管部門的扶貧幹部,冒着零下23攝氏度嚴寒,踏着皚皚白雪,走進幫扶的貧困戶家中送上節日禮物。

      通榆縣地處吉林省西部,這裏常年乾旱少雨,風沙肆虐,自然環境惡劣,因地域廣闊,素有八百里瀚海之稱。該縣蘇公坨鄉蘇公坨村和巨寶山村,是兩個有着535個貧困戶的貧困村。在該縣脫貧攻堅工作中,通榆縣市場監督管理局勇挑重擔,對這兩個村實行包保脫貧。54歲的局黨委辦公室主任徐方樓任職駐村第一書記,如今已經4年。

      1月14日上午,天寒地凍。在駐村扶貧點簡陋的小平房裡,記者見到了面部黝黑、雙手長滿老繭,一身农民打扮的徐書記。

      據徐書記介紹,經過局裡幾年來的幫扶,蘇公坨村和巨寶山村的貧困戶基本上都實現了脫貧,目前,還有兩個因車禍及因病致貧的貧困戶還在积極幫扶中。當日上午,記者跟通榆縣市場監督管理局副局長趙洪亮一起,來到了這兩個貧戶家中進行了走訪。正值新春佳節,細心的扶貧幹部們為貧困戶們精心準備了大紅的燈籠、春聯,還有水果等年貨。雪野茫茫,鄉路彎彎,儘管岔路很多,但開車的食品檢驗檢測中心主任馬立群卻是十分地路熟。他風趣地說:“從春到冬,我們天天下鄉扶貧,路都記在心裏了。”

      當一行人來到蘇公坨村六撮房屯貧困戶白延軍家中時,64歲的劉金環老人正在給躺在炕上的老伴翻身。見到了徐方樓和馬立群,老人激動得連忙下炕,熱情地打着招呼。接過喜氣洋洋的大紅燈籠和寫着“家好人好運氣好,福旺財旺日子旺”的春聯時,她的眼裡噙着淚水。據徐方樓介紹,現年66歲的白延軍是一位退伍老兵。2018年7月30日早晨,他趕着毛驢車去地里幹活時,在村路上不幸被一輛物流公司的大貨車撞傷,雖然經搶救保住了性命,卻成了沒有任何知覺的植物人。由於在賠償上存在爭議,官司還處在人民法院的二審階段。從院里堆放的銹跡斑斑的各種農機具可以看出,在未出車禍前,劉延軍是個勤勞的人,一家人生活也比較富裕。記者在走訪中獲悉,白延軍一家的不幸遭遇,深深地牽動了市場監管部門幹部職工的心。大家踴躍捐款1.36萬元,春耕生產時還送上種子、化肥等生產資料。更重要的是,扶貧幹部們多次到家中看望,鼓勵一家人勇於面對困境,重拾生活信心。

      在巨寶山村巨寶山屯,45歲的农民張波動情地拉着扶貧幹部們連聲道謝。原來,他的女兒張鈺堔患有先天性成骨不全症,脆弱的雙腿稍不留意就會造成骨折,今年15歲了,已經骨折了十幾次。雖然身患重病,坐着輪椅,但小鈺堔聰明伶俐,樂觀向上,已經上了初中二年級的她學習成績優異。為了幫扶張波一家,扶貧幹部們協調有關部門,不僅對他家原有土平房進行了泥草房改造,還在村裡給他安排了一個協警的公益崗位,每年有1萬多元的收入。記者在張波家的牆上,看到貼着《扶貧攻堅幫扶提示板》,上面不僅有《扶貧手冊》,還有包保幹部的姓名和聯繫電話。

      在基層走訪,雖然天氣寒冷,但陽光明媚,空氣清新。歡聲笑語中,記者感受到了扶貧幹部和貧困戶之間濃濃的情意。在蘇公坨村黨支部委員會,一位中年婦女與扶貧幹部杜克峰熱情地打招呼,雙方十分熟識地拉着家常。該中年婦女名叫王艷,是楊樹林村的一名社主任。她告訴記者,她和這些城裡來的扶貧幹部親如兄妹。

      通榆縣是國家級貧困縣,脫貧攻堅任務艱巨。談到扶貧工作時,通榆縣市場監督管理局局長徐立忠說:“我們在扶貧攻堅方面做了很多細緻的工作。”據其介紹,該局對所包保的蘇公坨村和巨寶山村採取多項舉措。去年,倡議、組織愛心企業,為包保村捐款40.4萬元。(蘇公坨村28.5萬元,巨寶山村11.9萬元)。聯手白城市老年科協到蘇公坨村開展義診活動,向貧困群眾免費進行體檢,免費贈送價值1.75萬元的藥品。組織通榆縣益壽堂醫藥有限公司到蘇公坨村開展送醫送葯義診活動,免費提供價值3萬元的藥品。協調通榆縣農業銀行到蘇公坨村送電腦、打印機、紙張等14類辦公用品,價值1.2萬元。

      為了促進貧困人口增收,發展農村庭院經濟,該局給村民們購買了1.4萬元豆角籽。在改善人居環境上,購買2.6萬元的櫥櫃革、鐵絲、1萬根樹軸、7000株花苗。雇傭鏟車、鈎機、叉車、四輪車,對包保的兩村進行了環境衛生整治,美化了生活環境。在危房改造上,為貧困戶購買了1300米的電纜線,飲用水井房電錶一塊。中秋節,為蘇公坨村358戶、巨寶山村177戶貧困戶每戶送2公斤月餅。春節前夕,為兩村535戶貧困戶每戶送去5公斤蘋果、1桶食用油。此外,包保幹部們還自掏腰包,為貧困戶購買電視機、電視天線、玉米種子、輪椅、秧苗、藥品、米面油、食品、兒童玩具、雞雛、電飯鍋、櫥櫃等,积極開展結親、認親和幫親活動。在蘇公坨鄉敬老院,舉辦了以“敬老愛老”為主題的支部黨日活動,為老人們送水果、衣物、涼席等物品,併為老人理了發,打掃了敬老院院內外衛生,把溫暖送到孤寡老人心上,讓老人們感受到了黨的溫暖和關懷。

    責任編輯:邊靜

    本站聲明:網站內容來源再生能源資訊網http://www.ccn.com.cn/,如有侵權請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※為什麼 USB CONNECTOR 是電子產業重要的元件?

    網頁設計一頭霧水??該從何著手呢? 找到專業技術的網頁設計公司,幫您輕鬆架站!

    ※想要讓你的商品成為最夯、最多人討論的話題?網頁設計公司讓你強力曝光

    ※想知道最厲害的台北網頁設計公司推薦台中網頁設計公司推薦專業設計師”嚨底家”!!

    新北清潔公司,居家、辦公、裝潢細清專業服務

  • “先承諾、當場辦” 黑龍江市場監管局六個“辦”扶持復工復產

      中國消費者報哈爾濱訊(記者劉傳江)2月29日,記者從黑龍江省政府新聞辦舉行的新聞發布會上獲悉,疫情當前,黑龍江省市場監管局憂企業之憂,急企業之急,通過六個“辦”的具體舉措支持企業復工復產,為企業排憂解難。

      據介紹,為應對疫情支持企業復工復產,黑龍江省市場監管局於2月12日出台了關於應對疫情支持服務市場主體發展的二十條措施,2月16日,會同省葯監局、省知識產局轉發了市場監管總局、國家葯監局、國家知識產權局支持復工復產十條措施,共計三十條支持企業復工復產復業具體措施。

      這些措施核心體現在六個方面:

      一是“不見面”,網上辦。提高“互聯網+” 服務水平,對市場主體登記註冊、食品、藥品、醫療器械、化妝品生產經營許可、檢驗檢測機構資質認定、特種設備生產和充裝單位許可申請等推行網上辦理,努力實現全程“不見面”辦理。已為878戶與疫情防控相關的醫療器械、藥品、防護用品、消殺用品生產、運輸和銷售,以及與群眾基本生活密切相關行業的市場主體快速辦理了登記註冊手續。

      二是壓時限,承諾辦。壓減審批環節、時間和成本的措施,能簡化的簡化、能合併的合併、能減少的減少。優化登記註冊流程,實行容缺受理、審核合一;壓縮復產轉產企業產品生產許可證審批時限,實行“先承諾、當場辦”;對停產2個月以上的食品生產企業只要承諾符合生產許可條件即可復工復產,對符合條件的部分食品經營企業實施“先證后查”。

      三是到期證,延續辦。對辦理工業產品許可證延續的企業,可在疫情結束后30日內辦理;企業在確保持續符合相關生產、質量管理規範前提下,自動延續藥品、醫療器械、化妝品生產經營許可有效期;食品從業人員健康證明有效期延長至一級響應解除之日起90日內。

      四是急需求,上門辦。對生產企業轉產口罩、防護服等應急物資的,對疫情防控所需藥品的註冊申請,對涉及防治新冠肺炎的專利申請、商標註冊的,對疫情防控急需產品檢驗檢測的,對需要辦理防疫商品條碼業務的,對需要辦理檢驗檢測機構資質認定的,建立綠色通道,特事特辦、急事急辦,已為16家企業的51個防疫產品提供了商品條碼辦理急速服務。

      五是優服務,免費辦。針對口罩、防護服等疫情防控物資,實行免費檢測,鼓勵有條件的市地對其他防疫產品檢驗費用可採取政府買單方式減免。目前已為38家企業和有關政府部門免費檢測醫用防護口罩、醫用防護服、乙醇消毒劑、含氯消毒劑等疫情防控產品155批次。

      六是輕違規,審慎辦。對生產、經營疫情防控相關物資的企業,已被列入經營異常名錄的,經企業申請,可以簡化流程、儘快移出。對因受疫情影響暫時失聯的企業,可以暫不列入經營異常名錄,已將年初以來補報年報的1949戶市場主體移出經營異常名錄(或經營異常狀態)。

    責任編輯:邊靜

    本站聲明:網站內容來源再生能源資訊網http://www.ccn.com.cn/,如有侵權請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※如何讓商品強力曝光呢? 網頁設計公司幫您建置最吸引人的網站,提高曝光率!!

    網頁設計一頭霧水??該從何著手呢? 找到專業技術的網頁設計公司,幫您輕鬆架站!

    ※想知道最厲害的台北網頁設計公司推薦台中網頁設計公司推薦專業設計師”嚨底家”!!

    ※幫你省時又省力,新北清潔一流服務好口碑

    ※別再煩惱如何寫文案,掌握八大原則!

  • 一秒看完,2020 最新各縣市電動機車補助總整理

    一秒看完,2020 最新各縣市電動機車補助總整理

    電動機車補助是所有想要購車的朋友最關心的議題,由於各縣市環保局的補助金額不同,常常看得一頭霧水,今年我們一樣整理了這張比較表讓你一眼就能看完,還可以幫你排序找出補助最多的縣市喔。

    電動機車補助分為中央與地方兩部分,2020 年的中央補助來自工業局與環保署,不分縣市都能獲得汰舊換新最高 1 萬 2 千元補助,新購電動機車則是 7 千元。

    比較麻煩的是,地方政府的補助配合施政方針而有所不同,我們幫各位全部整理在一張表內,這個金額包含了中央與地方政府的補助,讓大家可以快速看清楚,點擊欄位還能自動排序唷。

    金門的補助金額從去年 4 月公佈後就從最後一名變成冠軍,今年依然延續高額補助,成為各縣市補助最給力的地方政府。

    花蓮台東則是依靠花東基金的補助,而擁有不錯的額度,然而花東基金有名額限制,要獲得補助的朋友需要把握時間申請。

    在今年度的補助中,還有一些縣市佛心提供了中低收入戶補助,我們另外整理出列表如下,趕快分享給符合資格的朋友看看吧。

    以上是我們為各位整理 2020 年電動機車補助金額的資料,其中未包含交通部提供的 ABS 與 CBS 煞車系統補助(1,000 元),此外值得注意的是,各縣市對於新款七期燃油機車也都有提供相關補助,本表僅供參考,實際購車金額還是要與經銷商確認。

    如果想要了解各縣市政府補助金額的細節資料,也可以參考環保署提供的,裡面還有聯絡方式可供確認唷。

    (合作媒體:。首圖來源:攝)

    本站聲明:網站內容來源於EnergyTrend https://www.energytrend.com.tw/ev/,如有侵權,請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※帶您來了解什麼是 USB CONNECTOR  ?

    ※自行創業 缺乏曝光? 下一步"網站設計"幫您第一時間規劃公司的門面形象

    ※如何讓商品強力曝光呢? 網頁設計公司幫您建置最吸引人的網站,提高曝光率!!

    ※綠能、環保無空污,成為電動車最新代名詞,目前市場使用率逐漸普及化

    ※廣告預算用在刀口上,網站設計公司幫您達到更多曝光效益

    ※教你寫出一流的銷售文案?

  • Gogoro 計劃在美推出電動腳踏車「Gogoro Eeyo」,歐洲、台灣夏季登場

    Gogoro 計劃在美推出電動腳踏車「Gogoro Eeyo」,歐洲、台灣夏季登場

    Gogoro 醞釀推出的全新服務「Gogoro Eeyo」有了最新消息,從 Gogoro Eeyo 社群帳號顯示,是來自 Gogoro 的電動腳踏車,預計 5 月於美國推出,歐洲、台灣則在夏季登場。

    目前 Gogoro 官方已為 Gogoro Eeyo 開設社群帳號如 、、,在介紹中僅說明來自 Gogoro 的電動腳踏車,首發將在 5 月於美國推出,歐洲、台灣則預計在夏季登場,此外還加上表情符號來敘述,Gogoro 將從核心服務的電動機車,拓展到電動腳踏車的新領域。

    Gogoro 在電動機車、換電系統、共享機車等領域發展成熟,然而目前針對 Gogoro Eeyo 尚未有更進一步的資訊,像是 Gogoro Eeyo 是自家設計或與他廠合作的電動腳踏車?其電動腳踏車有何特色功能?採用隨車充電還是 Gogoro Network 的電池交換網路?會有如同 GoShare 架構的共享腳踏車服務、或定點租還的「電動版 YouBike」、亦或只單賣電動腳踏車?疫情影響下 Gogoro 又將如何布局美國市場?

    而從 Gogoro 向智慧財產局提交的商標資料加以推測,Gogoro Eeyo 外型可能與 Gogoro VIVA 相似,採充電系統而非換電方式;有獨立 App 可以控制,車上配有安全帽,還提供行車記錄的功能。

    Gogoro Eeyo 整個產品或服務都令人好奇,筆者相信 Gogoro Eeyo 將讓不少台灣民眾期待,《科技新報》也將為讀者帶來後續報導。

    (合作媒體:。首圖來源:)

    本站聲明:網站內容來源於EnergyTrend https://www.energytrend.com.tw/ev/,如有侵權,請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※為什麼 USB CONNECTOR 是電子產業重要的元件?

    網頁設計一頭霧水??該從何著手呢? 找到專業技術的網頁設計公司,幫您輕鬆架站!

    ※想要讓你的商品成為最夯、最多人討論的話題?網頁設計公司讓你強力曝光

    ※想知道最厲害的台北網頁設計公司推薦台中網頁設計公司推薦專業設計師”嚨底家”!!

    新北清潔公司,居家、辦公、裝潢細清專業服務

  • 「居家避疫」未解封,特斯拉宣布延期復工至少一週

    「居家避疫」未解封,特斯拉宣布延期復工至少一週

    美國加州尚未解除居家避疫(Shelter in Place)令,電動車大廠特斯拉(Tesla)位於加州費利蒙(Fremont)的組裝廠生產因此陷入停頓。5 月 1 日,特斯拉以電子郵件通知正在休無薪假的美國員工,將延期復工至少一週,具體時間待定。

    CNBC、路透社報導,由於舊金山灣區六郡(包括舊金山、聖克拉拉、聖馬刁、馬林、康特拉哥斯,以及佛利蒙廠所在的阿拉米達郡)下達居家避疫令,特斯拉佛利蒙廠已於 3 月 24 日暫停生產。因疫情未完全降溫,當地政府 4 月 27 日宣布,將居家避疫令期限由 5 月 4 日延長至 5 月底,特斯拉隨後也取消原定復工計畫。

    特斯拉北美人力資源主管 Valerie Capers Workman 在內部電子郵件表示,主管通知復工日期之前,休無薪假中的員工將保持休假狀態,預計需至少再等一週。在休無薪假期間,員工保有領取失業救濟金的資格,而在家工作或維持工廠基本營運的員工也將維持現有作業方式,直到另行通知。

    受疫情因素影響,4 月 7 日,特斯拉宣布啟動無薪假機制,所有時薪制員工休假至 5 月 4 日,可在家工作或任職必要職務的月薪制員工,依據職等不同,暫時減薪 10%~30% 不等,其餘無法在家工作,且未分配到必要工作的月薪制員工,也必須休無薪假。

    在此之前,特斯拉已通知人力派遣公司,針對加州費利蒙廠及內華達州的電動車電池廠實施裁員,影響約數百名約聘員工。

    1 日特斯拉股價重挫 10.30% 收 701.32 美元,原因是特斯拉執行長(Elon Musk)在 Twitter 發文稱,他認為特斯拉的股價過高。今年以來,特斯拉股價累計飆漲 67.65%,遠優於大盤標普 500 指數同期間挫跌 12.38%。

    (本文內文由  授權使用;首圖來源:Windell Oskay from Sunnyvale, CA, USA [], )

    本站聲明:網站內容來源於EnergyTrend https://www.energytrend.com.tw/ev/,如有侵權,請聯繫我們,我們將及時處理

    【其他文章推薦】

    ※如何讓商品強力曝光呢? 網頁設計公司幫您建置最吸引人的網站,提高曝光率!!

    網頁設計一頭霧水??該從何著手呢? 找到專業技術的網頁設計公司,幫您輕鬆架站!

    ※想知道最厲害的台北網頁設計公司推薦台中網頁設計公司推薦專業設計師”嚨底家”!!

    ※幫你省時又省力,新北清潔一流服務好口碑

    ※別再煩惱如何寫文案,掌握八大原則!