Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια
σε

 

Αρχική σελίδα Ιστολόγια Συζητήσεις Εκθέσεις Φωτογραφιών Αρχειοθήκες

Microsoft DataWarehouse String Resource Tool

Îåêßíçóå áðü ôï ìÝëïò KelMan. Τελευταία δημοσίευση από το μέλος KelMan στις 07-02-2005, 20:08. Υπάρχουν 5 απαντήσεις.
Ταξινόμηση Δημοσιεύσεων: Προηγούμενο Επόμενο
  •  06-02-2005, 14:00 1124

    No [N] Microsoft DataWarehouse String Resource Tool

    Αυτόν τον καιρό φτιάχνω μια εφαρμογή και βρήκα την ευκαιρία παράλληλα να αξιολογήσω το Enterprise Library που έκανε release η Microsoft. Εξετάζοντας τον κώδικα, είδα ότι μέσα σε κάθε project υπάρχει ένα αρχείο που ονομάζεται SR.Strings και περιέχει όλα τα strings που χρησιμοποιούνται μέσα στο project. Το ωραίο είναι ότι πέρα από το ότι χρησιμοποιείται για την παραγωγή του resource αρχείου, χρησιμοποιείται και για την παραγωγή ενός wrapper class μέσω του οποίου γίνεται η πρόσβαση στα strings αυτά.

    Όλα αυτά γίνονται με ένα εργαλείο που ονομάζεται Microsoft DataWarehouse String Resource Tool όπως αναφέρουν και τα remarks:

    // WARNING:
    // This file generated by the Microsoft DataWarehouse String Resource Tool 1.13.5000.0
    // from information in SR.strings.
    // DO NO MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN
    //

    Ξέρει κανείς τίποτα για το εργαλείο αυτό; 


    Vir prudens non contra ventum mingit
  •  06-02-2005, 15:48 1125 σε απάντηση της 1124

    Re: Microsoft DataWarehouse String Resource Tool

    Μήπως αναφέρεσαι αε αυτό; Smile

    1 String Resource Generator v1.2 now with support for Enterprise Library SR.strings files r

     I originally wrote the resource generator to run off a .resx file, but I’ve now updated the tools with two important changes. You can download the source from here, or the installer from here:

    Firstly, there is now a command line .exe, SRGenerator.exe, which can be used by doing the following command line:

    SRGenerator.exe <codeProvider> <namespace> <file>

    codeProvider  vb, cs, or CodeDom Provider assembly qualified class name.
    namespace     Namespace.
    file          File name, either a .strings file or a .resx file.

    Secondly, the tool can now p*** the SR.strings file, which is the one of the string resource file format used within Microsoft. It will generate a SR.resx file, and the SR class to use the resource. This means that if you want to edit the enterprise library resources, just run this installer, and then you can edit the library to your hearts content.

    The changes to the tool are the following:

    It registers itself under both the SRCodeGen custom tool (my original name), and the StringResourceTool (used in the enterprise library source).

          If the file that the custom tool is set on is not a resource file then it converts the file (in the format of the SR.strings file) into a resource file, and adds the file to the project underneath the .strings file, by doing the following:

    1.       Converts all options into resource file headers, e.g. #! culture_info = Resources.CultureInfo, becomes a header named “culture_info”, and with the value “Resources.CultureInfo”.

    2.       Converts all entries in the [strings] section into resources, with the name of the resource being the first part of the line, the value of the resource the part after the = sign, and the comment of the resource being anything in brackets after the name.

    The resource file is then processed according to the rules of my original post, with a couple of changes:

    ·         The comments denote the parameter names and optionally types of any arguments in the value (given as String.Format arguments). If there are no argument names specified in the comment, then the resource accessor generated will not use String.Format to replace any parameters in the resource. This allows having resources with un-replaced positional specifiers in them.

    ·         The following options (specified as resource headers) are implemented:

                                                                   i.      culture_info : If specified, then this will be copied verbatim into the generated file as part of the call to ResourceManager.GetString(name, …). If not specified, then a public static Culture property is added to the SR class to allow changing the culture manually.

                                                                  ii.      accessor_class_accessibility: If this value is “public”, then the SR class will be public, otherwise it will be internal.

    This uses CodeDOM, and so supports VB.NET as well as C#.

    Κάντε δεξιό κλικ εδώ, για να κάνετε λήψη των εικόνων. Για να συμβάλει στην προστασία του απορρήτου σας, το Outlook απέτρεψε την αυτόματη λήψη αυτής της εικόνας από το Internet.

    Αν θες είναι μερικά είναι μερικά RSS-Feeds για το Enterprise Library που μπορείς να μαθαίνεις τα πάντα:

    - Patterns & Practices: Enterprise Library: Workspace Home
    - Hisham Baz
    - Tom Hollander
    - Martin Granell

    Αυτά... Big Smile

    George J.



    George J. Capnias: Χειροπρακτικός Υπολογιστών, Ύψιστος Γκουράρχης της Κουμπουτερολογίας
    w: capnias.org, t: @gcapnias, l: gr.linkedin.com/in/gcapnias
    dotNETZone.gr News
  •  06-02-2005, 16:27 1126 σε απάντηση της 1125

    Re: Microsoft DataWarehouse String Resource Tool

    Χμμμ... Όχι, δεν είναι αυτό το εργαλείο, αν και απ' ότι βλέπω κάνει την ίδια δουλειά που κάνει και το εργαλείο της Microsoft! Θα βολευτώ με αυτό...

    Άλλο ένα θεματάκι που με απασχολεί είναι το εξής:
    Αν έχεις να παίξεις με roles για operation authorization σε μικτή εφαρμογή (πχ web forms με windows forms back-end) τότε δεν μπορείς να παίξεις με τον μηχανισμό ρόλων του ASP.NET και θα πρέπει να κάνεις implement έναν δικό σου. To Enterspise Frammework σου δίνει έτοιμο ένα ωραίο μοντέλο όπου καθορίζεις ρόλους, operations (πχ  Print Document) και κατόπιν απλά ή πολύπλοκα expressions του τύπου
    R:Manager OR R:Human Resources
    (δηλαδή το operation 'Print Document' μπορεί να το κάνει όποιος ανήκει στους ρόλους Manager ή Human Resources). Έχει έτοιμο τον parser για τις λογικές εκφράσεις και όλα δουλεύουν μια χαρά. Το μόνο που έχεις να κάνεις στην εφαρμογή σου είναι να κάνεις authorize ένα principal (που περιέχει το identity (που ανήκει στους ρόλους)) versus το operation name.

    Το κακό είναι ότι έχει μόνο δύο μηχανισμούς για αποθήκευση των ρόλων και των εκφράσεων. Ο ένας είναι στα XML config αρχεία του Enterprise Library και ο άλλος με χρήση του Authorization Manager (AzMan) που δουλεύει όμως μόνο σε Windows Server 2003 και Windows 2000 SP4 και όχι σε XP (προς το παρόν). Ο πρώτος τρόπος είναι χαζός γιατί αφήνει τα rules εκτεθειμένα και ο δεύτερος τρόπος δεν προσφέρεται λόγω του περιορισμού του. Άρα λοιπόν θα πρέπει να κάνω εγώ implement ένα custom Authorization Provider ο οποίος θα αποθηκεύει τα rules encrypted (για μεγαλύτερη ασφάλεια) σε μία βάση.

     (Άσχετο: Δεν μπορώ να καταλάβω γιατί μου βάζει αυτό το background grey στα γράμματα!)


    Vir prudens non contra ventum mingit
  •  06-02-2005, 16:39 1128 σε απάντηση της 1126

    Re: Microsoft DataWarehouse String Resource Tool

    Ούτε εγώ το κατάλαβα, αλλά πρέπει να είναι κατάλοιπο από την αρχική σχεδίαση του forum για να βοηθάει να βλέπεις που αρχίζει το ένα Topic και που τελιώνει το άλλο. Αυτό συμπαιρένεται εύκολα επειδή έτσι είναι και το pattern που εμφανίζεται.
     

    Μπορείς να παίζεις με το "Χρώμα Επισήμανσης" και να το αλλάζεις. Αντε να κάνει release ο Community Server και να τον φορέσουμε..

    George J.

    George J. Capnias: Χειροπρακτικός Υπολογιστών, Ύψιστος Γκουράρχης της Κουμπουτερολογίας
    w: capnias.org, t: @gcapnias, l: gr.linkedin.com/in/gcapnias
    dotNETZone.gr News
  •  07-02-2005, 19:15 1136 σε απάντηση της 1128

    Re: Microsoft DataWarehouse String Resource Tool

    Μάνο τρέχααααααααααα... O Role Provider!

    .NET 1.x Membership API and Microsoft.ScalableHosting

    Υ.Γ Κοίτα από την Home σελίδα του site. Πρέπει να είναι όλα εδώ! Wink

    George J.
    George J. Capnias: Χειροπρακτικός Υπολογιστών, Ύψιστος Γκουράρχης της Κουμπουτερολογίας
    w: capnias.org, t: @gcapnias, l: gr.linkedin.com/in/gcapnias
    dotNETZone.gr News
  •  07-02-2005, 20:08 1137 σε απάντηση της 1136

    Re: Microsoft DataWarehouse String Resource Tool

    Καλό φαίνεται αλλά "κολλάει" με το Enterprise Library? Αρκετό από το functionality που περιγράφεται στη σελίδα υπάρχει ήδη στο EntLib...
    Αυτό που ψάχνω είναι μόνο το κομμάτι που αποθηκεύει σε database όλες τις πληροφορίες αντί σε XML αρχείο ή στο AD.
    Vir prudens non contra ventum mingit
Προβολή Τροφοδοσίας RSS με μορφή XML
Με χρήση του Community Server (Commercial Edition), από την Telligent Systems